I'm running Debian wheezy. Many scripts in
/etc/init.d/ use various logging functions defined in the Linux Standard Base, like
log_warning_msg. The LSB documentation seems a bit ambiguous as to exactly what these functions should do:
The log_success_msg function shall cause the system to write a success message to an unspecified log file. The format of the message is unspecified. The log_success_msg function may also write a message to the standard output.
However, I guess this is interpreted as meaning that the functions can either write to a log file or just write to standard output. It seems that on Debian at least, it just causes a message to be written to standard output. My suspicions were confirmed when I checked out the file defining these functions,
/lib/lsb/init-functions - it just calls
echo to display any log message.
This is not helpful behaviour. Text written on boot to standard output disappears shortly after boot is complete, and may well scroll off the top of the screen in any case. Surely it would be far more helpful if these messages were actually stored in a log file; in fact I don't even see the point of logging anything via these functions if they are only going to go to standard output.
Is there any way to get these logs going to a file? Can anyone enlighten me as to why you would bother "logging" anything only to standard output? What helpful function does it serve?