Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Re: (cLive ;-) Re: Performance quandary

by SwellJoe (Scribe)
on Feb 26, 2002 at 15:30 UTC ( #147596=note: print w/ replies, xml ) Need Help??

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

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:

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

Comment on Re: Re: (cLive ;-) Re: Performance quandary

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://147596]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-11-27 15:12 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls