CLI: Default logging output to stderr instead of stdout

Makes it possible to separate console output from logging output so
command output can be piped to a file cleanly.
This commit is contained in:
Jason Wilder 2015-02-14 15:34:06 -07:00
parent ca37b24455
commit 7d4c319fcb

View File

@ -40,7 +40,7 @@ type ConsoleWriter struct {
// create ConsoleWriter returning as LoggerInterface.
func NewConsole() LoggerInterface {
return &ConsoleWriter{
lg: log.New(os.Stdout, "", log.Ldate|log.Ltime),
lg: log.New(os.Stderr, "", log.Ldate|log.Ltime),
Level: TRACE,
}
}