in reply to Will Log4perl work threaded?
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.sub Log::Log4perl::Appender::File::log { my($self, %params) = @_; my $fh = $self->{fh}; flock( $fh => LOCK_EX ); print $fh $params{message}; flock( $fh => LOCK_UN ); if ($self->{autoflush}) { my $oldfh = select $self->{fh}; $| = 1; select $oldfh; } }
_________
broquaint
|
|---|