Re: adding logging to Mason (need advice)

Jonathan Swartz <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
> So I was tihnking about this, and now I'm not so sure it's such a great
> idea.
> 
> I don't know that using this methods to avoid calling the actual log
> methods will actually improve performance.  With Log::Dispatch, calling
> ->would_log does about as much work as just calling ->log when no message
> is sent.  Calling both will only make things slower.

The real point of calling would_log or is_debug is to avoid generating 
expensive arguments (e.g. with Data::Dumper) and executing unnecessary 
loops. e.g. see

http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl.html#71cae

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.