Skip to content

Commit

Permalink
improve log commands
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Mateus <[email protected]>
  • Loading branch information
rjmateus committed Mar 16, 2021
1 parent 8c3c885 commit 4dabc0f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
}

0 comments on commit 4dabc0f

Please sign in to comment.