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
-
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.
|