Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
logging error should go to stderr instead of stdout #9547
logging module logs errors
var L* = newConsoleLogger() addHandler(L) error("should got to stderr")
stderr is empty
stderr has the message
having a special case for errors to stderr instead of stdout
Araq will probably hate me for this. But in fact, shouldn't all logs go to stderr?
The main reason for this is that stderr is where diagnostic information should go. Stdout is where the programs output goes, and keeping stdout clean of diagnostic information allows a program's output to be easily piped to other programs.