fix: log setflags
This commit is contained in:
parent
6c58e35ad1
commit
46c1f03454
|
@ -14,7 +14,7 @@ var Cleanup = &cobra.Command{
|
||||||
Use: "cleanup",
|
Use: "cleanup",
|
||||||
Short: "Handle clenaup for multiple versions of file in Backblaze",
|
Short: "Handle clenaup for multiple versions of file in Backblaze",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
log.SetFlags(log.Ldate)
|
log.SetFlags(log.Ldate | log.Lmicroseconds)
|
||||||
ctx, cancel := context.WithCancel(signalContext(cmd.Context()))
|
ctx, cancel := context.WithCancel(signalContext(cmd.Context()))
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ var Versions = &cobra.Command{
|
||||||
Use: "versions",
|
Use: "versions",
|
||||||
Short: "Handle versions of files in Backblaze",
|
Short: "Handle versions of files in Backblaze",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
log.SetFlags(log.Ldate)
|
log.SetFlags(log.Ldate | log.Lmicroseconds)
|
||||||
ctx, cancel := context.WithCancel(signalContext(cmd.Context()))
|
ctx, cancel := context.WithCancel(signalContext(cmd.Context()))
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ var Sync = &cobra.Command{
|
||||||
ctx, cancel := context.WithCancel(signalContext(cmd.Context()))
|
ctx, cancel := context.WithCancel(signalContext(cmd.Context()))
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
log.SetFlags(log.Ldate)
|
log.SetFlags(log.Ldate | log.Lmicroseconds)
|
||||||
filePath, err := cmd.Flags().GetString("file")
|
filePath, err := cmd.Flags().GetString("file")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln("file %w", err)
|
log.Fatalln("file %w", err)
|
||||||
|
|
Loading…
Reference in New Issue