I have recently discovered https://12factor.net/ — a set of requirements for production environment that look quite sensible, except for logging requirements.
https://12factor.net/logs says that logs should go to STDOUT
. WAT? WHY?
I've been mostly managing for last 7 years and must have missed something. But I do clearly remember that STDERR
was design to serve this exact purpose — be a separate stream for diagnostic information. And it's been used as such for decades.
Why breaking the convention?
I do remember that all HTTP servers by default were configured to send STDOUT to a browser (client) and send STDERR to log files. It was everywhere. It's obvious and default for most of environments. My first thought is that they authors of the 12-factor standard have made a mistake.
What am I missing? Why sending logs to STDOUT?
Please don't tell me that modern web-applications don't have "normal output". Firstly they do, secondly, this doesn't qualify as a justification to break the convention that worked for decades and is still perfectly fit for purpose.
I'd appreciate your thoughts. Thank you.