![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re: Will Log4perl work threaded?by broquaint (Abbot) |
on Sep 30, 2003 at 15:30 UTC ( #295317=note: print w/replies, xml ) | Need Help?? |
Having a quick peek at the source for Log::Log4perl::Appender::File it would appear that it will not be thread-safe due to its lack of file locking. But if you're using the Log::Log4perl::Appender::DBI layer you should be fine as DBI is thread-safe (in theory, at least).
As for a solution, I'd say just override the specific logging methods e.g Or perhaps create just a wrapper function/method that does the flocking before and after the call to the logging function. HTH
_________
In Section
Seekers of Perl Wisdom
|
|