Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: Will Log4perl work threaded?
by broquaint
|
|