Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Output logs to stdout instead of stderr
Browse files Browse the repository at this point in the history
Previously logs were sent to the same writer as errors which was
using os.Stderr, or the user had the option to discard all logs.

This change continues to send errors to os.Stderr, but uses os.Stdout
for logs. Users can still discard logs using -silent flag, or redirect
output themselves.
  • Loading branch information
bradleyfalzon committed Jun 22, 2017
1 parent 6b9a7a6 commit ba8f20b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func main() {
}

errs := log.New(os.Stderr, "", 0)
logs := errs
logs := log.New(os.Stdout, "", 0)
if *silent {
logs = log.New(ioutil.Discard, "", 0)
}
Expand Down

0 comments on commit ba8f20b

Please sign in to comment.