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"

In reply to Re: When to use logging and why? by nimdokk
in thread When to use logging and why? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.