Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Thanks dragonchild!

I've been getting a lot of 'get rid of logging' or 'let BerkeleyDB handle logging'. But neither of those answers the problem of how do I let a user help me debug any problem that might arise once it is out of my control.

It is true that logging calls were quite rampant in the first incarnation of the program (and most unnecessary calls are gone now that the program is known to work in all common-cases that I can generate). But some logging is still absolutely necessary, and I'm actually quite proud of the way I've implemented logging for this trivial little program.

I ripped off, er, reused a nice little logging class written by Jeff Rowan, found here:

http://jrf.odpn.net/writings/200011plog.shtml

And then added a loglevel value, so that the user (who has a configuration file for runtime changes to the system, of course) can increase the loglevel if problems arise. Ordinarily, logging is quite brief, and the calls to $log->print simply return after checking against the current loglevel. Pretty nifty (the ", 3" at the end of all of the logging statements is the loglevel for this entry--so it is a debug level log rather than a user level log).


In reply to Re: Re: (cLive ;-) Re: Performance quandary by SwellJoe
in thread Performance quandary by SwellJoe

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 romping around the Monastery: (18)
    As of 2014-07-30 08:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (229 votes), past polls