From 4dabc0fc3268a68120210c4f4e3b3f76baeaeee4 Mon Sep 17 00:00:00 2001 From: Ricardo Mateus Date: Tue, 16 Mar 2021 17:12:28 +0000 Subject: [PATCH] improve log commands Signed-off-by: Ricardo Mateus --- main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 27c8d9c..f38542a 100644 --- a/main.go +++ b/main.go @@ -34,12 +34,10 @@ func logCommandHistory() { if err != nil { panic(err) } - fmt.Fprintf(logOutput, "[%s]", time.Now().Format(time.RFC3339)) + fmt.Fprintf(logOutput, "[%s] ", time.Now().Format(time.RFC3339)) defer logOutput.Close() - time.Now() for _, arg := range os.Args[1:] { - fmt.Fprintf(logOutput, arg+" ") - fmt.Print(arg + " ") + fmt.Fprintf(logOutput, "%s ", arg) } fmt.Fprintln(logOutput, "") }