adding logging to Mason (need advice)

Jonathan Swartz <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
Mason does virtually no logging beyond fatal errors and a few warns, and 
I would like to start adding logging in earnest for 1.3. For example,

* debug log messages for each request and component start/end, that can 
be turned on for troubleshooting
* inform log messages when something mildly interesting happens, like 
the code cache being purged
* warning log messages for many situations that are currently fatal - 
for example an object file cannot be written

I was thinking about using log4perl (http://log4perl.sourceforge.net/) 
for this purpose. It provides great control over which category of log 
messages are generated, it integrates with all of the Log::Dispatch 
appenders, and it seems to be well supported.

However, I've never done anything with this project so would appreciate 
hearing about good or bad experiences.

Would it be easy to add a bunch of log4perl calls to Mason? Should we 
require users to install log4perl or somehow make the calls only if 
log4perl is available? Does all the flexibility lead to inefficiencies, 
e.g., will debug logging calls end up hurting performance even when the 
user has this turned off?

Thanks for any feedback.

Jon



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.