You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(38) |
Sep
(126) |
Oct
(23) |
Nov
(72) |
Dec
(36) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(76) |
Feb
(32) |
Mar
(19) |
Apr
(6) |
May
(54) |
Jun
(40) |
Jul
(45) |
Aug
(35) |
Sep
(51) |
Oct
(67) |
Nov
(10) |
Dec
(50) |
2004 |
Jan
(51) |
Feb
(22) |
Mar
(22) |
Apr
(28) |
May
(53) |
Jun
(99) |
Jul
(38) |
Aug
(49) |
Sep
(23) |
Oct
(29) |
Nov
(30) |
Dec
(48) |
2005 |
Jan
(15) |
Feb
(21) |
Mar
(25) |
Apr
(16) |
May
(131) |
Jun
|
Jul
(8) |
Aug
(5) |
Sep
(15) |
Oct
|
Nov
(15) |
Dec
(12) |
2006 |
Jan
(15) |
Feb
(20) |
Mar
(8) |
Apr
(10) |
May
(3) |
Jun
(16) |
Jul
(15) |
Aug
(11) |
Sep
(17) |
Oct
(27) |
Nov
(11) |
Dec
(12) |
2007 |
Jan
(19) |
Feb
(18) |
Mar
(33) |
Apr
(4) |
May
(15) |
Jun
(22) |
Jul
(19) |
Aug
(20) |
Sep
(14) |
Oct
(4) |
Nov
(34) |
Dec
(11) |
2008 |
Jan
(8) |
Feb
(18) |
Mar
(2) |
Apr
(4) |
May
(26) |
Jun
(9) |
Jul
(8) |
Aug
(8) |
Sep
(3) |
Oct
(17) |
Nov
(14) |
Dec
(4) |
2009 |
Jan
(6) |
Feb
(41) |
Mar
(21) |
Apr
(10) |
May
(21) |
Jun
|
Jul
(8) |
Aug
(4) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(5) |
2010 |
Jan
(14) |
Feb
(13) |
Mar
(7) |
Apr
(12) |
May
(4) |
Jun
(1) |
Jul
(11) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(10) |
Dec
|
2011 |
Jan
(7) |
Feb
(3) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(1) |
Jul
(6) |
Aug
(6) |
Sep
(10) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2012 |
Jan
(4) |
Feb
(5) |
Mar
(1) |
Apr
(7) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(5) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2013 |
Jan
(6) |
Feb
|
Mar
(14) |
Apr
(9) |
May
(3) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(6) |
2014 |
Jan
|
Feb
(1) |
Mar
(10) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Craig M. <C.M...@of...> - 2006-11-23 16:21:39
|
Hi, Looking at the Log::Log4Perl code and it's suitability to be used in an application framework I'm working on, I see that it can't be used (safely) in multiple applications running within the same mod_perl server. This is because even though these applications use there own module namespaces, they obviously will clash with each other when calling the init or init_once method.=20 I think a better design would be to make Log::Log4Perl descend from Class::Singleton, store all variables that are now globals in the instance, and let users optionally create subclassed versions of Log::Log4Perl in there own namespaces. E.g. you'ld get something like this: =20 package AppX; use AppX::Log4Perl; # descends from Log::Log4Perl ... my $l4p =3D AppX::Log4Perl->instance(); $l4p->init_once('appx.conf'); my $logger =3D $l4p->get_logger(); =20 .... then in another application sharing the same httpd: package AppY; use AppY::Log4Perl; # descends from Log::Log4Perl ... $l4p->init_once('appy.conf'); my $logger =3D $l4p->get_logger(); =20 =20 ... and AppX::Log4Perl will look like exactly like this: =20 package AppX::Log4Perl; use strict; use base(Log::Log4Perl); 1; __END__ =20 =20 I know it will be a major change to build this into Log::Log4Perl but I think it can be done while retaining backwards compatibility. All current class methods now can be automatically turned into both class and object methods at the same time like this: sub a_class_method { my $proto =3D shift; my $self =3D ref($proto) ? $proto : $proto->instance(); } Actually the magic above can become more involved if necessary. =20 Log::Log4Perl is a great piece of work.... I only miss that. =20 In general when making packages, one must really scratch one's head a few times if deciding to use globals, because they are almost always unnecessary (except for constants) and a simple object or else Class::Singleton based alternative is almost always the solution. =20 That's just my 2p. =20 Regards, Craig Manley. |
From: Mike S. <m...@pe...> - 2006-11-18 22:19:52
|
Just pushed a new release to log4perl.sf.net: 1.08 2006/11/18 * (ms) Applied test suite patch by Lars Thegler for ancient perl 5.005_03. * (ms) Applied patch by Jeremy Bopp to fix test suite running under Cygwin. * (ms) Fixed documentation bug in L4p:Appender::File, s/recreate_signal/recreate_check_signal. Thanks to Todd Chapman and Robert Jacobson for reporting this. * (ms) Fixed init(), which now deletes any config file watchers left over from previous init_and_watch() calls. Reported by Andreas Koenig who saw sporadic errors in the test suite, thanks! If all goes well, it'll hit CPAN in a couple of days. Enjoy! -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2006-11-01 18:05:53
|
On Wed, 1 Nov 2006, Robert Jacobson wrote: > If you want it to WORK, use "recreate_check_signal", NOT "recreate_signal". > > Unfortunately, it looks like there is a disagreement between the code > and documentation in Appender::File and the FAQ page. File.pm says > "recreate_signal" in the POD and in new(), but the CODE uses > "recreate_check_signal". Fixed in the 1.08 docs, thanks for reporting this! -- Mike Mike Schilli m...@pe... > > HTH, > Rob > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Robert J. <yad...@sn...> - 2006-11-01 15:42:31
|
At 05:44 PM 10/30/2006, Todd Chapman wrote: >My problem is that I configured Log::Log4perl::Appender::File >to recreate my log file when it recieves a USR1 signal, but it >is killing my program instead. >[...] >log4perl.appender.File.recreate_signal = USR1 If you want it to WORK, use "recreate_check_signal", NOT "recreate_signal". Unfortunately, it looks like there is a disagreement between the code and documentation in Appender::File and the FAQ page. File.pm says "recreate_signal" in the POD and in new(), but the CODE uses "recreate_check_signal". HTH, Rob |
From: Todd C. <to...@ch...> - 2006-10-30 22:37:44
|
Hello all, I have written a persistent server using POE and am using Log4perl for logging (of course!) My problem is that I configured Log::Log4perl::Appender::File to recreate my log file when it recieves a USR1 signal, but it is killing my program instead. Here is my logging config: log4perl.logger = DEBUG, File log4perl.appender.File = Log::Log4perl::Appender::File log4perl.appender.File.filename = smshub.log log4perl.appender.File.mode = append log4perl.appender.File.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.File.layout.ConversionPattern = %d %p> %F{1}:%L %M - %m%n log4perl.appender.File.recreate = 1 log4perl.appender.File.recreate_signal = USR1 log4perl.appender.File.recreate_pid_write = /tmp/smshubid Any ideas? Thanks! -Todd |
From: Mike S. <m...@pe...> - 2006-10-27 02:35:00
|
On Tue, 24 Oct 2006, Jeremy Bopp wrote: > Attached is a small patch to the 1.07 version of Log4perl that should > make it possible for all the Config and Watch tests to succeed when > running under Cygwin's Perl package. The patch ensures that a few file > handles are closed as soon as they are no longer necessary so that they > don't block the deletion and recreation of the files associated with > those handles later in the test scripts. Applied in 1.08, thanks! -- Mike Mike Schilli m...@pe... |
From: Jeremy B. <je...@mo...> - 2006-10-24 19:03:05
|
Attached is a small patch to the 1.07 version of Log4perl that should make it possible for all the Config and Watch tests to succeed when running under Cygwin's Perl package. The patch ensures that a few file handles are closed as soon as they are no longer necessary so that they don't block the deletion and recreation of the files associated with those handles later in the test scripts. I'll be happy to provide the patch in a different format if requested. -Jeremy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jeremy Bopp Software Developer Motive, Inc. je...@mo... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
From: Mike S. <m...@pe...> - 2006-10-17 21:14:55
|
On Tue, 17 Oct 2006, Judd Taylor wrote: > Looking at the Synchronized.pm file, it shows an arg to new(), %options, > that is passed to IPC::Shareable tie() call. That would be an ideal > place to stick on the Mode => '775' option. > > How can I define options to the constructor, if it's only init'd with a > call to read a config file (i.e. how can I pass the options through the > config file)? You can pass the IPC::Shareable options hash this way: use Log::Log4perl qw(:easy); my $conf = q[ log4perl.category = DEBUG, Syncer1 # Screen appender 1 (unsynchronized) log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.layout = SimpleLayout # Synchronizing appender, using the file appender above log4perl.appender.Syncer1 = Log::Log4perl::Appender::Synchronized log4perl.appender.Syncer1.appender = Screen log4perl.appender.Syncer1.options = \ sub { { create=>1, destroy=>1, mode=>0775 } } log4perl.appender.Syncer1.key = l4p1 ]; Log::Log4perl->init(\$conf); DEBUG "foo!"; -- Mike Mike Schilli m...@pe... > > Thanks, > Judd > > Ok, I've got the basic version of Log4perl::Appender::Synchronized > running, but I'm running into a problem where the IPC::Shareable > semaphores are created without group permissions. > > This causes apps starting with a different user to crash, as they don't > have the correct permissions to be messing with those semaphores. > > > On Wed, 2006-10-11 at 11:22 -0700, Mike Schilli wrote: > > On Wed, 11 Oct 2006, Judd Taylor wrote: > > > > > I'm thinking about using log4perl as an alternative to my current object > > > logging system, but I'm not sure how it will handle a situation where I > > > need to append to a master logfile from several processes at the same > > > time. > > > > Log::Log4perl::Appender::Synchronized to the rescue: > > > > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 > > > > -- Mike > > > > Mike Schilli > > m...@pe... > > > > > I need to append to this log from several programs, some of which are > > > multi-threaded (fork) servers, as well as from several of the same > > > programs at the same time. Avoiding conflicts where messages are lost, > > > and atomicity are pretty critical. I also want to centralize the > > > configuration for all clients in one place. > > > > > > Is this going to be easy with log4perl? What relevant docs should I be > > > looking at first? > > > > > > I need something like this running pretty shortly, and my only > > > alternative would be to write a forking Net::Server thing to handle the > > > incoming requests. Getting something like that reliable will probably > > > not be a quick thing... > > > > > > Thanks, > > > Judd > > > > > > > > > > > > > > > -- > > > ____________________________ > > > Judd Taylor > > > Software Engineer > > > > > > Orbital Systems, Ltd. > > > 8304 Esters Blvd, Suite 870 > > > Irving, TX 75063-2209 > > > > > > ju...@or... > > > (469) 442-1767 x127 > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, security? > > > Get stuff done quickly with pre-integrated technology to make your job easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > log4perl-devel mailing list > > > log...@li... > > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > > > > -- > ____________________________ > Judd Taylor > Software Engineer > > Orbital Systems, Ltd. > 8304 Esters Blvd, Suite 870 > Irving, TX 75063-2209 > > ju...@or... > (469) 442-1767 x127 > > |
From: Judd T. <ju...@or...> - 2006-10-17 19:35:02
|
Ok, I've got the basic version of Log4perl::Appender::Synchronized running, but I'm running into a problem where the IPC::Shareable semaphores are created without group permissions. This causes apps starting with a different user to crash, as they don't have the correct permissions to be messing with those semaphores. Looking at the Synchronized.pm file, it shows an arg to new(), %options, that is passed to IPC::Shareable tie() call. That would be an ideal place to stick on the Mode => '775' option. How can I define options to the constructor, if it's only init'd with a call to read a config file (i.e. how can I pass the options through the config file)? Thanks, Judd On Wed, 2006-10-11 at 11:22 -0700, Mike Schilli wrote: > On Wed, 11 Oct 2006, Judd Taylor wrote: > > > I'm thinking about using log4perl as an alternative to my current object > > logging system, but I'm not sure how it will handle a situation where I > > need to append to a master logfile from several processes at the same > > time. > > Log::Log4perl::Appender::Synchronized to the rescue: > > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 > > -- Mike > > Mike Schilli > m...@pe... > > > I need to append to this log from several programs, some of which are > > multi-threaded (fork) servers, as well as from several of the same > > programs at the same time. Avoiding conflicts where messages are lost, > > and atomicity are pretty critical. I also want to centralize the > > configuration for all clients in one place. > > > > Is this going to be easy with log4perl? What relevant docs should I be > > looking at first? > > > > I need something like this running pretty shortly, and my only > > alternative would be to write a forking Net::Server thing to handle the > > incoming requests. Getting something like that reliable will probably > > not be a quick thing... > > > > Thanks, > > Judd > > > > > > > > > > -- > > ____________________________ > > Judd Taylor > > Software Engineer > > > > Orbital Systems, Ltd. > > 8304 Esters Blvd, Suite 870 > > Irving, TX 75063-2209 > > > > ju...@or... > > (469) 442-1767 x127 > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > log4perl-devel mailing list > > log...@li... > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > -- ____________________________ Judd Taylor Software Engineer Orbital Systems, Ltd. 8304 Esters Blvd, Suite 870 Irving, TX 75063-2209 ju...@or... (469) 442-1767 x127 |
From: Lars T. <la...@th...> - 2006-10-15 22:14:12
|
Mike Schilli wrote: > On Sun, 15 Oct 2006, Lars Thegler wrote: >>The test fails under perl 5.005_03: > Thanks for this. I guess it's not easy dealing with an 8 year old > perl release :). True. Perl 5.005_03 is part of the FreeBSD 4.x legacy branch. Estimated end-of-life is 4 months away, then we'll be rid of it ;) > I've included it in the next release 1.08. Much obliged :) /Lars |
From: Mike S. <m...@pe...> - 2006-10-15 19:25:53
|
On Sun, 15 Oct 2006, Lars Thegler wrote: > The test fails under perl 5.005_03: > > --cut-- > not ok 14 - Autocorrecting rootLogger/rootlogger typo > # Failed test 'Autocorrecting rootLogger/rootlogger typo' > # in t/004Config.t at line 235. > # got: undef > # expected: '' > --cut-- Thanks for this. I guess it's not easy dealing with an 8 year old perl release :). I've included it in the next release 1.08. -- Mike Mike Schilli m...@pe... > The following patch fixes this, and works correctly on newer perls as > well (tested on 5.6.2 and 5.8.8): > > --cut-- > --- t/004Config.t.orig Sun Oct 15 17:57:11 2006 > +++ t/004Config.t Sun Oct 15 18:03:08 2006 > @@ -203,7 +203,7 @@ > ###################################################################### > open STDERR, ">$TMP_FILE"; > open IN, "<$TMP_FILE" or die "Cannot open $TMP_FILE"; > -sub readwarn { return scalar <IN>; } > +sub readwarn { return scalar <IN> || ''; } > END { close IN } > --cut-- > > /Lars > |
From: Lars T. <la...@th...> - 2006-10-15 16:10:38
|
Mike Schilli wrote: > * (ms) Autocorrecting rootlogger/rootLogger typo The test fails under perl 5.005_03: --cut-- not ok 14 - Autocorrecting rootLogger/rootlogger typo # Failed test 'Autocorrecting rootLogger/rootlogger typo' # in t/004Config.t at line 235. # got: undef # expected: '' --cut-- The following patch fixes this, and works correctly on newer perls as well (tested on 5.6.2 and 5.8.8): --cut-- --- t/004Config.t.orig Sun Oct 15 17:57:11 2006 +++ t/004Config.t Sun Oct 15 18:03:08 2006 @@ -203,7 +203,7 @@ ###################################################################### open STDERR, ">$TMP_FILE"; open IN, "<$TMP_FILE" or die "Cannot open $TMP_FILE"; -sub readwarn { return scalar <IN>; } +sub readwarn { return scalar <IN> || ''; } END { close IN } --cut-- /Lars |
From: Mike S. <m...@pe...> - 2006-10-12 05:59:36
|
Just pushed 1.07 to the web site, here's the release notes: 1.07 2006/10/11 * (ms) Removed checks for unlink() in t/017Watch.t since they failed on win32. * (ms) Fixed doc bug in Appender::File reported by Robert Jacobson. * (ms) Added FAQ on why to use Log4perl and not another logging system on CPAN. * (ms) Fixed %M, %L, etc. level in logcarp/cluck/croak/confess (thanks to Ateeq Altaf) * (ms) Autocorrecting rootlogger/rootLogger typo * (ms) Better warning on missing loggers in config sanity check If all goes well, it'll hit CPAN in a couple of days. Enjoy! -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2006-10-12 05:45:13
|
On Tue, 10 Oct 2006, Ateeq Altaf wrote: > Sorry I should have given a better description, the problem occurs when > using %M in the appender layout pattern. > Here's a sample of the log output: Ah, got it, fixed in 1.07, thanks! -- Mike Mike Schilli m...@pe... > otter# cat /var/tmp/fetch.log > 2006/10/10 12:02:52 main::Download DEBUG Connecting to hostftp.talis.com > 2006/10/10 12:02:52 main::Download DEBUG Logging in as user staff > 2006/10/10 12:02:52 Log::Log4perl::Logger::logcroak FATAL Can't change > remote directory to /fetch/test1: > 2006/10/10 12:02:52 Log::Log4perl::Logger::logcroak FATAL /fetch/test1: > No such file or directory. > 2006/10/10 12:02:52 Log::Log4perl::Logger::logcroak FATAL at fetch.pl > line 217 > 2006/10/10 12:02:52 Log::Log4perl::Logger::logcroak FATAL > main::Download('XML::LibXML::Element=SCALAR(0x4dd404)', '/tmp/fetch') > called at fetch.pl line 159 > 2006/10/10 12:02:52 Log::Log4perl::Logger::logcroak FATAL > main::ProcessDataset('XML::LibXML::Element=SCALAR(0x4dd404)', > 'XML::LibXML::Element=SCALAR(0x4cc748)', '/tmp/fetch') called at > fetch.pl line 76 > > $log->logcroak() was called in main::Download. > > Using: > > Log::Log4perl->init(\qq{ > log4perl.logger = DEBUG, LogFile, > Screen > log4perl.appender.LogFile = > Log::Log4perl::Appender::File > log4perl.appender.LogFile.filename = $LogFile > log4perl.appender.LogFile.layout = PatternLayout > log4perl.appender.LogFile.layout.ConversionPattern = %d %M > %p %m%n > log4perl.appender.Screen = > Log::Log4perl::Appender::Screen > log4perl.appender.Screen.Threshold = INFO > log4perl.appender.Screen.layout = PatternLayout > log4perl.appender.Screen.layout.ConversionPattern = %M %m%n > }); > > Let me know if you still need sample code. > > Thanks > Ateeq > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...] > Sent: 10 October 2006 03:19 > To: Ateeq Altaf > Cc: log...@li... > Subject: Re: [log4perl-devel] Log::Log4Perl::Logger Carp functions > missing depth adjustment > > On Mon, 9 Oct 2006, Ateeq Altaf wrote: > > > The Carp related logcarp/croak/confess/cluck messages log at the wrong > > caller depth. > > You sure? Please provide a snippet of test code that shows the error. > > Here's a quick test: > > $ test.pl > croak at ./t line 9 > main::foo() called at ./t line 13 > $ test.pl 1 > 2006/10/09 19:09:39 l4pcroak at ./t line 10 > 2006/10/09 19:09:39 main::foo() called at ./t line 13 > l4pcroak at ./t line 10 > main::foo() called at ./t line 13 > > $ cat test.pl > #!/usr/bin/perl -w > > use Log::Log4perl qw(:easy); > use Carp; > Log::Log4perl->easy_init($DEBUG); > > my($l4pcroak) = @ARGV; > > sub foo { > $l4pcroak ? LOGCROAK("l4pcroak") : croak("croak"); > } > > foo(); > > -- Mike > > Mike Schilli > m...@pe... > > > > > > > > > My quick fudge below, also moved a Carp::longmess into an if > > statement.as $message doesn't look like it gets used outside. > > > > > > > > Sorry if the bugs already filed somewhere I didn't know where to look. > > > > > > > > Regards > > > > Ateeq > > > > > > > > > > > > > > > > otter# gdiff -u Logger.pm.orig Logger.pm > > > > --- Logger.pm.orig 2006-07-18 18:52:22.000000000 +0100 > > > > +++ Logger.pm 2006-10-09 14:33:06.032491000 +0100 > > > > @@ -911,9 +911,11 @@ > > > > > > > > if ($self->is_warn()) { > > > > my $message = Carp::longmess($msg); > > > > + $Log::Log4perl::caller_depth++; > > > > foreach (split(/\n/, $message)) { > > > > $self->warn("$_\n"); > > > > } > > > > + $Log::Log4perl::caller_depth--; > > > > Carp::cluck($msg); > > > > } > > > > } > > > > @@ -928,9 +930,11 @@ > > > > > > > > if ($self->is_warn()) { > > > > my $message = Carp::shortmess($msg); > > > > + $Log::Log4perl::caller_depth++; > > > > foreach (split(/\n/, $message)) { > > > > $self->warn("$_\n"); > > > > } > > > > + $Log::Log4perl::caller_depth--; > > > > Carp::carp($msg) if $Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR; > > > > } > > > > } > > > > @@ -945,11 +949,13 @@ > > > > local $Carp::CarpLevel = $Carp::CarpLevel + 1; > > > > my $msg = $self->warning_render(@_); > > > > > > > > - my $message = Carp::shortmess($msg); > > > > if ($self->is_fatal()) { > > > > + my $message = Carp::shortmess($msg); > > > > + $Log::Log4perl::caller_depth++; > > > > foreach (split(/\n/, $message)) { > > > > $self->fatal("$_\n"); > > > > } > > > > + $Log::Log4perl::caller_depth--; > > > > } > > > > > > > > $Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR ? > > > > @@ -965,11 +971,13 @@ > > > > my $msg = $self->warning_render(@_); > > > > local $Carp::CarpLevel = 2; > > > > > > > > - my $message = Carp::longmess($msg); > > > > if ($self->is_fatal()) { > > > > + my $message = Carp::longmess($msg); > > > > + $Log::Log4perl::caller_depth++; > > > > foreach (split(/\n/, $message)) { > > > > $self->fatal("$_\n"); > > > > } > > > > + $Log::Log4perl::caller_depth--; > > > > } > > > > > > > > $Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR ? > > > > The very latest from Talis > > read the latest news at www.talis.com/news > > listen to our podcasts www.talis.com/podcasts > > see us at these events www.talis.com/events > > join the discussion here www.talis.com/forums > > join our developer community www.talis.com/tdn > > and read our blogs www.talis.com/blogs > > Visit Talis at this year's PLA Conference, 11-13th October 2006. We > plan to showcase new product enhancements and unveil new initiatives. > > > > > > > > Any views or personal opinions expressed within this email may not be > those of Talis Information Ltd. The content of this email message and > any files that may be attached are confidential, and for the usage of > the intended recipient only. If you are not the intended recipient, then > please return this message to the sender and delete it. Any use of this > e-mail by an unauthorised recipient is prohibited. > > > > The very latest from Talis > read the latest news at www.talis.com/news > listen to our podcasts www.talis.com/podcasts > see us at these events www.talis.com/events > join the discussion here www.talis.com/forums > join our developer community www.talis.com/tdn > and read our blogs www.talis.com/blogs > Visit Talis at this year's PLA Conference, 11-13th October 2006. We plan to showcase new product enhancements and unveil new initiatives. > > > > Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited. > |
From: Mike S. <m...@pe...> - 2006-10-11 19:51:08
|
On Wed, 11 Oct 2006 mat...@th... wrote: > I'm using log4perl and, at the end of my script, i want to zip up my > logfile along with some other information (winxp, activestate > 5.8.8.817). however, the log4perl logfile is empty in the .zip file. > the problem is that the buffer isn't flushed by the time i call > wzzip.exe to zip it up. is there a parameter with which to force a > buffer flush? here's the relevant code: The easiest way to have an appender flush automatically is setting its autoflush property: log4perl.appender.Logfile.autoflush = 1 What I find puzzling is that both Log::Dispatch::File and Log4perl's native file appender Log::Log4perl::Appender::File have autoflush *on* by default. You might want to make sure the log message actually gets through Log4perl's filtering mechanisms (level, category). -- Mike Mike Schilli m...@pe... > > ============================= > use Log::Log4perl qw(get_logger :levels); > > our $logger = get_logger(); > $logger->level($INFO); > my $appender = Log::Log4perl::Appender->new( > "Log::Dispatch::File", > filename => "$pdir\\Logs\\${date}_${jobname}.log", > mode => "append", > ); > $logger->add_appender($appender); > my $layout = Log::Log4perl::Layout::PatternLayout->new("%d %p> %F{1}:%L > %M - %m%n"); > $appender->layout($layout); > ============================= > > |
From: Mike S. <m...@pe...> - 2006-10-11 19:32:22
|
On Wed, 11 Oct 2006, Ford, Andy wrote: > In the docs, at least one example looks something like > Log::Log4perl->init($log4perlconfig) or die "Failure reading log > config"; That's a typo, it'll be corrected in 1.07. > Which is great, just what you expect. It works differently, though. Both init() and init_and_watch() will die() on error. -- Mike Mike Schilli m...@pe... > > But when I try the same thing with init_and_watch, I get a false return > from init_and_watch > ***even when it succeeds***, as demonstrated by the > Log::Log4perl->initialized() call that follows. > > This would not seem to be the desired behavior. > > Upgraded my log4perl 1.03 -> 1.06, but still the same. > > Andy Ford > and...@ag... > > > > -----Original Message----- > > From: Mike Schilli [mailto:m...@pe...] > > Sent: Wednesday, October 11, 2006 1:31 PM > > To: Ford, Andy > > Cc: log...@li... > > Subject: Re: [log4perl-devel] init & init_and_watch behave differently > > > > On Wed, 11 Oct 2006, Ford, Andy wrote: > > > > > Looks like init and init_and_watch return differently. > > > init_and_watch seems to return false even though the log gets > > > initialized. > > > > Both init() and init_and_watch() will throw an exception if they > > fail initializing Log4perl -- they're not returning a meaningful > > return code. > > > > For your test suite, you might want to check sucess by using eval{}: > > > > eval { > > Log::Log4perl->init_and_watch(...); > > }; > > > > if($@) { > > # Error! > > } else { > > # Success! > > } > > > > -- Mike > > > > Mike Schilli > > m...@pe... > > > > > Here's test program that illustrates. > > > On my system, (Log4perl 1.03, HP-UX 11, perl 5.8.7), I get > > > > > > Failure reading log config /etc/URLbot4.log4perl.conf: at > > > /home/forda/Log4perlBug line 6. > > > well OK > > > well OK > > > > > > #!/usr/local/perl-5.8.7/bin/perl > > > use warnings; > > > use strict; > > > use Log::Log4perl qw(get_logger :levels :no_extra_logdie_message); > > > my $log4perlconfig = "/etc/URLbot4.log4perl.conf"; > > > Log::Log4perl->init_and_watch($log4perlconfig,'USR2') or > > warn "Failure > > > reading log config $log4perlconfig: $!"; > > > if(Log::Log4perl->initialized()) { > > > # Yes, Log::Log4perl has already been initialized > > > print "well OK\n"; > > > } else { > > > die "logs unitialized...: $!"; > > > } > > > Log::Log4perl->init($log4perlconfig) or warn "Failure > > reading log config > > > $log4perlconfig: $!"; > > > if(Log::Log4perl->initialized()) { > > > # Yes, Log::Log4perl has already been initialized > > > print "well OK\n"; > > > } else { > > > die "logs unitialized...: $!"; > > > } > > > > > > Andy Ford > > > EEMS > > > x56647 > > > and...@ag... > > > > > > > > > > > > > > -------------------------------------------------------------- > > ----------------------- > > > A.G. Edwards & Sons' outgoing and incoming e-mails are > > electronically > > > archived and subject to review and/or disclosure to someone other > > > than the recipient. > > > > > > > > -------------------------------------------------------------- > > ----------------------- > > > > > > > > > > > -------------------------------------------------------------- > > ----------- > > > Using Tomcat but need to do more? Need to support web > > services, security? > > > Get stuff done quickly with pre-integrated technology to > > make your job easier > > > Download IBM WebSphere Application Server v.1.0.1 based on > > Apache Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& > > dat=121642 > > > _______________________________________________ > > > log4perl-devel mailing list > > > log...@li... > > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > > > |
From: Ford, A. <and...@AG...> - 2006-10-11 18:58:27
|
OK I'm not explaining well. In the docs, at least one example looks something like Log::Log4perl->init($log4perlconfig) or die "Failure reading log config"; Which is great, just what you expect. But when I try the same thing with init_and_watch, I get a false return from init_and_watch=20 ***even when it succeeds***, as demonstrated by the Log::Log4perl->initialized() call that follows. This would not seem to be the desired behavior. Upgraded my log4perl 1.03 -> 1.06, but still the same. Andy Ford and...@ag... =20 > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...]=20 > Sent: Wednesday, October 11, 2006 1:31 PM > To: Ford, Andy > Cc: log...@li... > Subject: Re: [log4perl-devel] init & init_and_watch behave differently >=20 > On Wed, 11 Oct 2006, Ford, Andy wrote: >=20 > > Looks like init and init_and_watch return differently. > > init_and_watch seems to return false even though the log gets > > initialized. >=20 > Both init() and init_and_watch() will throw an exception if they > fail initializing Log4perl -- they're not returning a meaningful > return code. >=20 > For your test suite, you might want to check sucess by using eval{}: >=20 > eval { > Log::Log4perl->init_and_watch(...); > }; >=20 > if($@) { > # Error! > } else { > # Success! > } >=20 > -- Mike >=20 > Mike Schilli > m...@pe... >=20 > > Here's test program that illustrates. > > On my system, (Log4perl 1.03, HP-UX 11, perl 5.8.7), I get > > > > Failure reading log config /etc/URLbot4.log4perl.conf: at > > /home/forda/Log4perlBug line 6. > > well OK > > well OK > > > > #!/usr/local/perl-5.8.7/bin/perl > > use warnings; > > use strict; > > use Log::Log4perl qw(get_logger :levels :no_extra_logdie_message); > > my $log4perlconfig =3D "/etc/URLbot4.log4perl.conf"; > > Log::Log4perl->init_and_watch($log4perlconfig,'USR2') or=20 > warn "Failure > > reading log config $log4perlconfig: $!"; > > if(Log::Log4perl->initialized()) { > > # Yes, Log::Log4perl has already been initialized > > print "well OK\n"; > > } else { > > die "logs unitialized...: $!"; > > } > > Log::Log4perl->init($log4perlconfig) or warn "Failure=20 > reading log config > > $log4perlconfig: $!"; > > if(Log::Log4perl->initialized()) { > > # Yes, Log::Log4perl has already been initialized > > print "well OK\n"; > > } else { > > die "logs unitialized...: $!"; > > } > > > > Andy Ford > > EEMS > > x56647 > > and...@ag... > > > > > > > >=20 > -------------------------------------------------------------- > ----------------------- > > A.G. Edwards & Sons' outgoing and incoming e-mails are=20 > electronically > > archived and subject to review and/or disclosure to someone other > > than the recipient. > > > >=20 > -------------------------------------------------------------- > ----------------------- > > > > > >=20 > -------------------------------------------------------------- > ----------- > > Using Tomcat but need to do more? Need to support web=20 > services, security? > > Get stuff done quickly with pre-integrated technology to=20 > make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > >=20 > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > > _______________________________________________ > > log4perl-devel mailing list > > log...@li... > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > >=20 |
From: <mat...@th...> - 2006-10-11 18:53:44
|
Hi, =20 I'm using log4perl and, at the end of my script, i want to zip up my logfile along with some other information (winxp, activestate 5.8.8.817). however, the log4perl logfile is empty in the .zip file. the problem is that the buffer isn't flushed by the time i call wzzip.exe to zip it up. is there a parameter with which to force a buffer flush? here's the relevant code: =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D use Log::Log4perl qw(get_logger :levels); =20 our $logger =3D get_logger(); $logger->level($INFO); my $appender =3D Log::Log4perl::Appender->new( "Log::Dispatch::File", filename =3D> "$pdir\\Logs\\${date}_${jobname}.log", mode =3D> "append", ); $logger->add_appender($appender); my $layout =3D Log::Log4perl::Layout::PatternLayout->new("%d %p> = %F{1}:%L %M - %m%n"); $appender->layout($layout); =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 |
From: Mike S. <m...@pe...> - 2006-10-11 18:43:46
|
On Wed, 11 Oct 2006, Ford, Andy wrote: > While we're on the synch subject, I asked this question over at > PerlMonks (http://perlmonks.org/index.pl?node_id=573779) > but hey let's ask over here too: > > But how do I test the synchronization? > More specifically, can I reliably generate an overwrite situation that > the syncronization would fix? Here's how the Log4perl test suite does it: http://search.cpan.org/src/MSCHILLI/Log-Log4perl-1.06/t/042SyncApp.t -- Mike Mike Schilli m...@pe... > > > Andy Ford > EEMS > x56647 > and...@ag... > > > > -----Original Message----- > > From: Mike Schilli [mailto:m...@pe...] > > Sent: Wednesday, October 11, 2006 1:23 PM > > To: Judd Taylor > > Cc: log...@li... > > Subject: Re: [log4perl-devel] log4perl multithread question > > > > On Wed, 11 Oct 2006, Judd Taylor wrote: > > > > > I'm thinking about using log4perl as an alternative to my > > current object > > > logging system, but I'm not sure how it will handle a > > situation where I > > > need to append to a master logfile from several processes > > at the same > > > time. > > > > Log::Log4perl::Appender::Synchronized to the rescue: > > > > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 > > > > -- Mike > > > > Mike Schilli > > m...@pe... > > > > > I need to append to this log from several programs, some of > > which are > > > multi-threaded (fork) servers, as well as from several of the same > > > programs at the same time. Avoiding conflicts where > > messages are lost, > > > and atomicity are pretty critical. I also want to centralize the > > > configuration for all clients in one place. > > > > > > Is this going to be easy with log4perl? What relevant docs > > should I be > > > looking at first? > > > > > > I need something like this running pretty shortly, and my only > > > alternative would be to write a forking Net::Server thing > > to handle the > > > incoming requests. Getting something like that reliable > > will probably > > > not be a quick thing... > > > > > > Thanks, > > > Judd > > > > > > > > > > > > > > > -- > > > ____________________________ > > > Judd Taylor > > > Software Engineer > > > > > > Orbital Systems, Ltd. > > > 8304 Esters Blvd, Suite 870 > > > Irving, TX 75063-2209 > > > > > > ju...@or... > > > (469) 442-1767 x127 > > > > > > > > > > > -------------------------------------------------------------- > > ----------- > > > Using Tomcat but need to do more? Need to support web > > services, security? > > > Get stuff done quickly with pre-integrated technology to > > make your job easier > > > Download IBM WebSphere Application Server v.1.0.1 based on > > Apache Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& > > dat=121642 > > > _______________________________________________ > > > log4perl-devel mailing list > > > log...@li... > > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > > > > > -------------------------------------------------------------- > > ----------- > > Using Tomcat but need to do more? Need to support web > > services, security? > > Get stuff done quickly with pre-integrated technology to make > > your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on > > Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& > > dat=121642 > > _______________________________________________ > > log4perl-devel mailing list > > log...@li... > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > > > ------------------------------------------------------------------------------------- > A.G. Edwards & Sons' outgoing and incoming e-mails are electronically > archived and subject to review and/or disclosure to someone other > than the recipient. > > ------------------------------------------------------------------------------------- > > |
From: Ford, A. <and...@AG...> - 2006-10-11 18:32:07
|
While we're on the synch subject, I asked this question over at PerlMonks (http://perlmonks.org/index.pl?node_id=3D573779) but hey let's ask over here too: But how do I test the synchronization? More specifically, can I reliably generate an overwrite situation that the syncronization would fix? Andy Ford EEMS x56647 and...@ag... =20 > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...]=20 > Sent: Wednesday, October 11, 2006 1:23 PM > To: Judd Taylor > Cc: log...@li... > Subject: Re: [log4perl-devel] log4perl multithread question >=20 > On Wed, 11 Oct 2006, Judd Taylor wrote: >=20 > > I'm thinking about using log4perl as an alternative to my=20 > current object > > logging system, but I'm not sure how it will handle a=20 > situation where I > > need to append to a master logfile from several processes=20 > at the same > > time. >=20 > Log::Log4perl::Appender::Synchronized to the rescue: >=20 > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 >=20 > -- Mike >=20 > Mike Schilli > m...@pe... >=20 > > I need to append to this log from several programs, some of=20 > which are > > multi-threaded (fork) servers, as well as from several of the same > > programs at the same time. Avoiding conflicts where=20 > messages are lost, > > and atomicity are pretty critical. I also want to centralize the > > configuration for all clients in one place. > > > > Is this going to be easy with log4perl? What relevant docs=20 > should I be > > looking at first? > > > > I need something like this running pretty shortly, and my only > > alternative would be to write a forking Net::Server thing=20 > to handle the > > incoming requests. Getting something like that reliable=20 > will probably > > not be a quick thing... > > > > Thanks, > > Judd > > > > > > > > > > -- > > ____________________________ > > Judd Taylor > > Software Engineer > > > > Orbital Systems, Ltd. > > 8304 Esters Blvd, Suite 870 > > Irving, TX 75063-2209 > > > > ju...@or... > > (469) 442-1767 x127 > > > > > >=20 > -------------------------------------------------------------- > ----------- > > Using Tomcat but need to do more? Need to support web=20 > services, security? > > Get stuff done quickly with pre-integrated technology to=20 > make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > >=20 > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > > _______________________________________________ > > log4perl-devel mailing list > > log...@li... > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > >=20 > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel >=20 ---------------------------------------------------------------------------= ---------- A.G. Edwards & Sons' outgoing and incoming e-mails are electronically archived and subject to review and/or disclosure to someone other=20 than the recipient. ---------------------------------------------------------------------------= ---------- |
From: Mike S. <m...@pe...> - 2006-10-11 18:31:14
|
On Wed, 11 Oct 2006, Ford, Andy wrote: > Looks like init and init_and_watch return differently. > init_and_watch seems to return false even though the log gets > initialized. Both init() and init_and_watch() will throw an exception if they fail initializing Log4perl -- they're not returning a meaningful return code. For your test suite, you might want to check sucess by using eval{}: eval { Log::Log4perl->init_and_watch(...); }; if($@) { # Error! } else { # Success! } -- Mike Mike Schilli m...@pe... > Here's test program that illustrates. > On my system, (Log4perl 1.03, HP-UX 11, perl 5.8.7), I get > > Failure reading log config /etc/URLbot4.log4perl.conf: at > /home/forda/Log4perlBug line 6. > well OK > well OK > > #!/usr/local/perl-5.8.7/bin/perl > use warnings; > use strict; > use Log::Log4perl qw(get_logger :levels :no_extra_logdie_message); > my $log4perlconfig = "/etc/URLbot4.log4perl.conf"; > Log::Log4perl->init_and_watch($log4perlconfig,'USR2') or warn "Failure > reading log config $log4perlconfig: $!"; > if(Log::Log4perl->initialized()) { > # Yes, Log::Log4perl has already been initialized > print "well OK\n"; > } else { > die "logs unitialized...: $!"; > } > Log::Log4perl->init($log4perlconfig) or warn "Failure reading log config > $log4perlconfig: $!"; > if(Log::Log4perl->initialized()) { > # Yes, Log::Log4perl has already been initialized > print "well OK\n"; > } else { > die "logs unitialized...: $!"; > } > > Andy Ford > EEMS > x56647 > and...@ag... > > > > ------------------------------------------------------------------------------------- > A.G. Edwards & Sons' outgoing and incoming e-mails are electronically > archived and subject to review and/or disclosure to someone other > than the recipient. > > ------------------------------------------------------------------------------------- > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Mike S. <m...@pe...> - 2006-10-11 18:23:20
|
On Wed, 11 Oct 2006, Judd Taylor wrote: > I'm thinking about using log4perl as an alternative to my current object > logging system, but I'm not sure how it will handle a situation where I > need to append to a master logfile from several processes at the same > time. Log::Log4perl::Appender::Synchronized to the rescue: http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 -- Mike Mike Schilli m...@pe... > I need to append to this log from several programs, some of which are > multi-threaded (fork) servers, as well as from several of the same > programs at the same time. Avoiding conflicts where messages are lost, > and atomicity are pretty critical. I also want to centralize the > configuration for all clients in one place. > > Is this going to be easy with log4perl? What relevant docs should I be > looking at first? > > I need something like this running pretty shortly, and my only > alternative would be to write a forking Net::Server thing to handle the > incoming requests. Getting something like that reliable will probably > not be a quick thing... > > Thanks, > Judd > > > > > -- > ____________________________ > Judd Taylor > Software Engineer > > Orbital Systems, Ltd. > 8304 Esters Blvd, Suite 870 > Irving, TX 75063-2209 > > ju...@or... > (469) 442-1767 x127 > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Ford, A. <and...@AG...> - 2006-10-11 18:22:59
|
http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4 perl/Appender/Synchronized.html Andy Ford EEMS x56647 and...@ag... =20 > -----Original Message----- > From: Judd Taylor [mailto:ju...@or...]=20 > Sent: Wednesday, October 11, 2006 10:46 AM > To: log...@li... > Subject: [log4perl-devel] log4perl multithread question >=20 > I'm thinking about using log4perl as an alternative to my=20 > current object > logging system, but I'm not sure how it will handle a=20 > situation where I > need to append to a master logfile from several processes at the same > time.=20 >=20 > I need to append to this log from several programs, some of which are > multi-threaded (fork) servers, as well as from several of the same > programs at the same time. Avoiding conflicts where messages are lost, > and atomicity are pretty critical. I also want to centralize the > configuration for all clients in one place. >=20 > Is this going to be easy with log4perl? What relevant docs should I be > looking at first?=20 >=20 > I need something like this running pretty shortly, and my only > alternative would be to write a forking Net::Server thing to=20 > handle the > incoming requests. Getting something like that reliable will probably > not be a quick thing... >=20 > Thanks, > Judd >=20 >=20 >=20 >=20 > --=20 > ____________________________ > Judd Taylor > Software Engineer >=20 > Orbital Systems, Ltd. > 8304 Esters Blvd, Suite 870 > Irving, TX 75063-2209 >=20 > ju...@or... > (469) 442-1767 x127 >=20 >=20 > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel >=20 ---------------------------------------------------------------------------= ---------- A.G. Edwards & Sons' outgoing and incoming e-mails are electronically archived and subject to review and/or disclosure to someone other=20 than the recipient. ---------------------------------------------------------------------------= ---------- |
From: Ford, A. <and...@AG...> - 2006-10-11 17:38:00
|
Looks like init and init_and_watch return differently. init_and_watch seems to return false even though the log gets initialized. Here's test program that illustrates. On my system, (Log4perl 1.03, HP-UX 11, perl 5.8.7), I get=20 Failure reading log config /etc/URLbot4.log4perl.conf: at /home/forda/Log4perlBug line 6. well OK well OK #!/usr/local/perl-5.8.7/bin/perl use warnings; use strict; use Log::Log4perl qw(get_logger :levels :no_extra_logdie_message); my $log4perlconfig =3D "/etc/URLbot4.log4perl.conf"; Log::Log4perl->init_and_watch($log4perlconfig,'USR2') or warn "Failure reading log config $log4perlconfig: $!"; if(Log::Log4perl->initialized()) { # Yes, Log::Log4perl has already been initialized print "well OK\n"; } else { die "logs unitialized...: $!"; } Log::Log4perl->init($log4perlconfig) or warn "Failure reading log config $log4perlconfig: $!"; if(Log::Log4perl->initialized()) { # Yes, Log::Log4perl has already been initialized print "well OK\n"; } else { die "logs unitialized...: $!"; } Andy Ford EEMS x56647 and...@ag... ---------------------------------------------------------------------------= ---------- A.G. Edwards & Sons' outgoing and incoming e-mails are electronically archived and subject to review and/or disclosure to someone other=20 than the recipient. ---------------------------------------------------------------------------= ---------- |
From: Judd T. <ju...@or...> - 2006-10-11 15:47:04
|
I'm thinking about using log4perl as an alternative to my current object logging system, but I'm not sure how it will handle a situation where I need to append to a master logfile from several processes at the same time. I need to append to this log from several programs, some of which are multi-threaded (fork) servers, as well as from several of the same programs at the same time. Avoiding conflicts where messages are lost, and atomicity are pretty critical. I also want to centralize the configuration for all clients in one place. Is this going to be easy with log4perl? What relevant docs should I be looking at first? I need something like this running pretty shortly, and my only alternative would be to write a forking Net::Server thing to handle the incoming requests. Getting something like that reliable will probably not be a quick thing... Thanks, Judd -- ____________________________ Judd Taylor Software Engineer Orbital Systems, Ltd. 8304 Esters Blvd, Suite 870 Irving, TX 75063-2209 ju...@or... (469) 442-1767 x127 |