fix: log setflags

This commit is contained in:
Urko 2023-07-26 17:59:14 +02:00
parent 6c58e35ad1
commit 46c1f03454
3 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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)