2 ms·
stdout is terrible, logging would pollute information you want piped to other programs So, the focus is on regular unix programs, not daemons. stderr isn't gr
by wruza 5y ago
stdout is terrible, logging would pollute information you want piped to other programs
So, the focus is on regular unix programs, not daemons.
stderr isn't great, because log messages are more status than errors, and usually breaks error detection, handling, and processing
Traditionally programs use -v flag (also -vv, -vvvv, you get the idea) to control the stderr “pressure”. Stderr is diagnostics output (stdlog), all logging should go there, but only WARN+, unless a user asked for more details. Logging regular programs to syslog is unusual.
Logging daemons via syslog(3) was usual before process managers, which now redirect stdout (which would be pointed to /dev/null otherwise) to a file, syslog or a similar facility.