[Tutor] Logging in Linux
Noufal Ibrahim
noufal at airtelbroadband.in
Wed Oct 24 15:29:44 CEST 2007
wormwood_3 wrote:
> Now, what I would like to do is instead send this output to one or
> more of the standard linux log files. First though, I am wondering, what
> is the standard procedure in a case like this?
You can either have a config file to specify a log area or use syslog to
do the logging. The standard logging module has a RotatingFileHandler
and a SysLogHandler for both these methods.
> Is it more appropriate to
> make a totally separate log file for all user-added scripts (or one a
> piece), and put them in /var/log or elsewhere? Where have you all found
> to be helpful places to log messages from automated scripts on Linux
> systems? The end goal is simply to have a place that I can check to see
> that the script is running as expected, or troubleshoot issues if need
> arise.
/var/log looks nice. I think you should just make it configurable enough
so that people can relocate if they want to.
--
~noufal
http://nibrahim.net.in/
More information about the Tutor
mailing list