|
From: Mike S. <m...@pe...> - 2008-11-08 04:21:48
|
On Sat, 8 Nov 2008, John Little wrote:
> I've tried using Log4perl in a multi-threaded server script and the
> synchronized appender fails consistently after logging exactly 32768
> lines, with (piped through cat -v): Thread 1 terminated abnormally:
> semop(1343496 ^@^@^@^@^@^@^@^@^A^@^@^P) failed: Numerical result out
> of range at
Got it, it's not really related to threads, there was a bug in the
semaphore code that caused this, I've fixed it in CVS, it'll roll out
with the next release (1.20).
By the way, have you tried using the 'syswrite' option of the file
appender instead? It prevents overlapping messages as well and it's
easier to use than the synchronizing appender:
log4perl.appender.Logfile.syswrite = 1
http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#How_can_I_synchronize_access_to_an_appender
-- Mike
Mike Schilli
m...@pe...
|