Re: [log4perl-devel] A threading question

2008-11-10 Thread John Little
Hi Of course, that should be my $main_tid = threads->tid; sub propagate_hup { if (threads->tid == $main_tid) { for my $t (threads->list) { $t->kill('HUP') unless $t->tid == $main_tid; } } return 1; } Regards, John -

Re: [log4perl-devel] A threading question

2008-11-10 Thread John Little
Mike, all, > A simple fix is: > > Log::Log4perl->init_and_watch("dllog.conf", 'HUP', >{preinit_callback => \&propagate_hup} ); > sub propagate_hup { >for my $t (threads->list) { $t->kill('HUP'); } >return 1; > } A little too simple upon reflection; I don't

Re: [log4perl-devel] A threading question

2008-11-08 Thread John Little
Mike > Can you provide code to reproduce the problem? I'd be happy to track it > down. I haven't been able to reproduce the strife I was having; most use of signals was failing. However, there is the obvious. My perl 5.10 is delivering all OS signals to the 'main' thread, so the logger in it ge

Re: [log4perl-devel] A threading question

2008-11-07 Thread Mike Schilli
On Sat, 8 Nov 2008, John Little wrote: > Which reminds me, I couldn't get init_and_watch($conf_file, 'HUP') to > work with threads, which is not surprising, given that perl threads > and signals don't mix very well. Can you provide code to reproduce the problem? I'd be happy to track it down. --

Re: [log4perl-devel] A threading question

2008-11-07 Thread John Little
Mike > Got it, ... , it'll roll out with the next release (1.20). Thank you! > 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.Logfil

Re: [log4perl-devel] A threading question

2008-11-07 Thread Mike Schilli
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 [EMAIL PROTECTED]@[EMAIL PROTECT

[log4perl-devel] A threading question

2008-11-07 Thread John Little
Mike Schilli said: > It would be great if you could provide test results / bug reports of > running Log4perl with Perl threads, though. > > That being said, there are synchronization mechanisms for file > appenders: > > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 I've tried usin

Re: [log4perl-devel] A threading question.

2008-10-16 Thread Mike Schilli
On Thu, 16 Oct 2008, Rob Coops wrote: > So my question is; is log4perl thread safe when using the standard > file appender module with it? I've never tested running Log4perl with Perl threads, so the answer is probably "no" :). It would be great if you could provide test results / bug reports of

[log4perl-devel] A threading question.

2008-10-16 Thread Rob Coops
Hi list, I'm new to this list so please forgive me if I am asking an obvious question that every member of this list has asked at some point in time... When I look at the FAQ for log4perl I see that there is a mention of threading and having every thread log a thread specific message like a users