Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Log-Dispatch CPAN distribution.

Report information
The Basics
Id: 32577
Status: rejected
Priority: 0/
Queue: Log-Dispatch

People
Owner: Nobody in particular
Requestors: sin.avatar [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Wrong work with Threshold and buffered default value
uname -a: FreeBSD statbase04.rambler.ru 6.2-20061003-SNAP FreeBSD 6.2- 20061003-SNAP #0: Tue Oct 3 12:22:21 UTC 2006 perl: perl5 (revision 5 version 8 subversion 8) configuration: platform: osname=freebsd, osvers=6.2-20061003-snap, archname=amd64- freebsd Log-Dispatch-2.20 Log-Log4perl-1.14 When i wrote Mailer config like log4perl.appender.Mailer = Log::Dispatch::Email::MailSend log4perl.appender.Mailer.to = $mailTo log4perl.appender.Mailer.subject = lstatistic failure log4perl.appender.Mailer.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Mailer.Threshold = WARN log4perl.appender.Mailer.layout.ConversionPattern = \%d [\%P] [\%p] \%F \%L \%m\%n and in begin got log4perl.logger = TRACE, Logfile, Screen, Mailer In exececution time i got a hundrets mails, if i write: log4perl.appender.Mailer = Log::Dispatch::Email::MailSend log4perl.appender.Mailer.to = $mailTo log4perl.appender.Mailer.subject = lstatistic failure log4perl.appender.Mailer.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Mailer.Threshold = WARN log4perl.appender.Mailer.buffered = 0 log4perl.appender.Mailer.layout.ConversionPattern = \%d [\%P] [\%p] \%F \%L \%m\%n No such problem. For these reasons i think, that is a bug in module (or in parent module logic)
On Wed Jan 23 12:17:30 2008, sin.avatar wrote: Show quoted text
> uname -a: FreeBSD statbase04.rambler.ru 6.2-20061003-SNAP FreeBSD 6.2- > 20061003-SNAP #0: Tue Oct 3 12:22:21 UTC 2006 > perl: perl5 (revision 5 version 8 subversion 8) configuration: > platform: osname=freebsd, osvers=6.2-20061003-snap, archname=amd64- > freebsd > > Log-Dispatch-2.20 > Log-Log4perl-1.14 > > When i wrote Mailer config like > > log4perl.appender.Mailer = Log::Dispatch::Email::MailSend > log4perl.appender.Mailer.to = $mailTo > log4perl.appender.Mailer.subject = lstatistic failure > log4perl.appender.Mailer.layout = > Log::Log4perl::Layout::PatternLayout > log4perl.appender.Mailer.Threshold = WARN > log4perl.appender.Mailer.layout.ConversionPattern = \%d [\%P] [\%p] \%F > \%L \%m\%n > > and in begin got > log4perl.logger = TRACE, Logfile, Screen, Mailer > > In exececution time i got a hundrets mails, if i write: > log4perl.appender.Mailer = Log::Dispatch::Email::MailSend > log4perl.appender.Mailer.to = $mailTo > log4perl.appender.Mailer.subject = lstatistic failure > log4perl.appender.Mailer.layout = > Log::Log4perl::Layout::PatternLayout > log4perl.appender.Mailer.Threshold = WARN > log4perl.appender.Mailer.buffered = 0 > log4perl.appender.Mailer.layout.ConversionPattern = \%d [\%P] [\%p] \%F > \%L \%m\%n > No such problem. > > For these reasons i think, that is a bug in module (or in parent module > logic)
Please report this to the Log4Perl author. If it's really a problem with Log::Dispatch he can tell me, but I suspect it's not.
From: sin.avatar [...] gmail.com
I examine my program once more and change my mind: problem in fork calls (it is my opinion). In parent process mail bufferisation start, but finish in every children. I already use buffered = 0, but i intresting : will be new version without such problem with fork ?
From: sin.avatar [...] gmail.com
add this test to fully describe my problem. I stil need duplicate my problem in Log::Dispatch as you advice?
#!/usr/bin/perl use strict; use warnings; use Log::Log4perl qw( get_logger ); use POSIX qw(:stdlib_h); my $mailTo = 'your@mail.com'; my $conf = qq( log4perl.logger = TRACE, Screen, Mailer log4perl.appender.Screen = Log::Log4perl::Appender::ScreenColoredLevels log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen.layout.ConversionPattern = \%d [\%P] [\%p] \%F \%L \%m\%n log4perl.appender.Mailer = Log::Dispatch::Email::MailSend log4perl.appender.Mailer.to = $mailTo log4perl.appender.Mailer.subject = Log::Dispatch::Email::MailSend test log4perl.appender.Mailer.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Mailer.Threshold = WARN log4perl.appender.Mailer.buffered = 1 log4perl.appender.Mailer.layout.ConversionPattern = \%d [\%P] [\%p] \%F \%L \%m\%n ); Log::Log4perl::init( \$conf ); get_logger()->warn('Just warn'); my @pids; for (1..10) { my $pid = fork; if ( 0 == $pid ) { get_logger()->trace('Just trace'); exit EXIT_SUCCESS; } else { push @pids, $pid; } } for (@pids) { waitpid ($_, 0); }
Subject: Re: [rt.cpan.org #32577] Wrong work with Threshold and buffered default value
Date: Wed, 23 Jan 2008 14:32:35 -0600 (CST)
To: "sin.avatar via RT" <bug-Log-Dispatch [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 23 Jan 2008, sin.avatar via RT wrote: Show quoted text
> I examine my program once more and change my mind: problem in fork > calls (it is my opinion). In parent process mail bufferisation start, > but finish in every children. I already use buffered = 0, but i > intresting : will be new version without such problem with fork ?
I'm not sure I'm following you, but a _simple_ code example (of Log::Dispatch, not Log4Perl) would be ideal. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/