Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Dispite the barely obfuscated obsenity for a name, FoxtrotUniform
is right on! I have been working in Operations/Support for
seven years, and I have found that the vast majority of programs
out there couldn't log their way out of a saw mill. Think Windoze
"some.dll has caused a fault in module some.dll"... really freeking
helpful! NOT!

A good program should log every pertinant piece of information,
working directories, parameters passed on the command line, start times
end times, files read from/written to, etc. The log should be very
friendly to the eyes, and work well with tools such as grep.
A good log will have, lots of space between log sections, obvious signs of positive or
negative results, meaningful error messages, clearly understandable
tags, etc.

For example, this is the log of an FTP program that I wrote:
(PS -it was decided that end times would not be all that helpful in this case)

Date: Tue Aug 6 04:00:00 Ping test results: Working Using Firewall: xxx.xxxxxxx.com GEIS ID: 12:?????????? +1 File: /opt/somedir/data/xxx/xxx.2002_08_06.04.00.00 Date: Tue Aug 6 04:25:01 Ping test results: Working Using Firewall: xxx.xxxxx.com GEIS ID: ZZ:?????????? -No file to download. Date: Tue Aug 6 04:25:01 Ping test results: Working Using Firewall: xxx.xxxxx.com GEIS ID: ZZ:?????????? -[!!!]Download failed[!!!] check /opt/somedir/detailedLog for details.

In this case, the general log (above) is archived and kept for 120 days,
the detailedLog, FTP Debuging (Level 1) information, is kept in a seperate
file and archived for 30 days. This keeps the general log more "user friendly"
but still captures the truley "nitty-gritty" incase of programming errors.

Scanning through this file for errors is easy, visually the
individual entries are short, time stamped and each major
piece of the processing has an individual line in the report.

Additionally successful downloads are marked with a "+",
No data to download is marked with a "-", and errors are
marked with "!!!". These prepended characters, "+" "-" "!!!",
All work with grep pretty well. After a long weekend, with three
of four days of logs to go through, I'll just grep !!! logfile
to quickly get caught up with my log reading.


In reply to Re: Defensive Programming and Audit Trails by cybear
in thread Defensive Programming and Audit Trails by FoxtrotUniform

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (16)
    As of 2014-07-29 16:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (220 votes), past polls