Hi,
I have used Log4perl with Apache using mod_perl before, and it works well provided you bear a few points in mind. One thing which you need to be careful of is file locking (flock and the like): make sure you consider deadlocks carefully (I had an indecipherable problem with using Log::Dispatch's Log::Dispatch::File::Rolling appender with my Log4perl configuration with mod_perl on Win32 (Win32 -- 'nuff said???) which I never really got to the bottom of. That was almost a year ago though, so don't let me put you off: I haven't tried this combination again recently with newer versions).
Also, you now have Log::Log4perl::Appender::Synchronized, which uses IPC to synchronize access to the files, so this should alleviate some of the problems which I encountered. Also, please note the Log4perl FAQs on this subject; specifically "How can I synchronize access to an appender?" "How can I run Log::Log4perl under mod_perl?".
As long as you are careful, Log4perl is an extremely rewarding way to develop web based applications, which has certainly reduced my development effort on the projects where I used it.
Don't be afraid to take the Log4perl plunge if you are still debating whether to use it: it is a really nice piece of software which will really help your development if used properly.
I hope that this helps.
Cheers,
-- Dave :-)
$q=[split+qr,,,q,~swmi,.$,],+s.$.Em~w^,,.,s,.,$&&$$q[pos],eg,print
In reply to Re: log4perl and apache
by DaveH
in thread log4perl and apache
by wellsja
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |