record commandline arguments to backup log
This commit is contained in:
parent
ae925f2bad
commit
133dc0513d
Binary file not shown.
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -62,6 +63,8 @@ func init() {
|
||||
func main() {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.Printf("[MSG] Commandline: %v\r\n", os.Args)
|
||||
bkupList = append(bkupList, fmt.Sprintf("### Commandline: %v", os.Args))
|
||||
|
||||
_, err := os.Stat(aodPath)
|
||||
if err != nil {
|
||||
log.Printf("[ERR] Path Of AODs Not Exists.\r\n")
|
||||
@ -236,7 +239,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
_WriteFileFromStringSlice("./Backup_"+time.Now().Format("2006-01-02_15:04:05")+".txt", bkupList)
|
||||
_WriteFileFromStringSlice("./Backup_"+time.Now().Format("2006-01-02_15-04-05")+".txt", bkupList)
|
||||
log.Printf("[MSG] Total Backed Up Modules: %d\r\n", ttl)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user