Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
It has always seemed to me that the 8-level priority scale of syslog makes it pretty easy to classify your logging. While levels 0-1 probably don't apply to most scripts (unless they are truly mission-critical), levels 2-7 are pretty self-explanatory. Levels 2-4 should all be for messages that report conditions that are known problems the script recognizes, and most likely require some action (or at least investigation). Levels 5-6 are for messages that report conditions that may or may not be problems (as far as you know). Analysis of consistent reporting of such conditions over time may warrant them being 'promoted' to a higher level. Level 7 is for 'everything else'. When you know you have a problem, but you also know that none of the other logging identifies the condition(s), copious level-7 logging of data and conditions that are currently assumed as 'always OK' is done, since at least one of these assumptions must be invalid (or some of the higher-level logging would catch it).

Unless there is a performance issue, lots of level-7 logging is almost never a bad thing. Since all log messages can be identified by severity, it is an easy thing to filter out this 'noise'.

fnord


In reply to Re: Balancing Logging and Code Readability by Illuminatus
in thread Balancing Logging and Code Readability by ack

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-25 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found