in reply to When to use logging and why?

For what we do at least, I log everything that is going on, and make an attempt to capture output from external programs that the script(s) might be using for troubleshooting mainly when something goes wrong, which it invariably does. By accoutinging for this, we can capture problems, isolate them better and not crash our system when something goes wrong since all our scripts either run under cron (on Unix) or as un-attended batch jobs on Windows 2000. Normally, we only look at the logs when something has blown up, or in the initial testing stages. But we log everything religiously. It also gives us a quick idea as to how many times a script has been run (because we archive the logs for a few months). We know how often the program is successful as well as how often it fails. Logging is perhaps a matter of personal choice and also more importantly circumstance and situation. As one wise sysadmin where I work put it: "Logs are your friend." :-)


"Ex libris un peut de tout"