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: David B. <dp...@hp...> - 2005-09-20 16:01:39
|
On Mon, 2005-09-19 at 22:17 -0700, Mike Schilli wrote: > > Thanks for the patch, it's been applied and will be released with 1.01. > Great! My first patch committed to an open-source program. :) > The patch will increase performance only during init(), you must be > calling init() fairly often to see a difference. Since init() should > only be called at startup, you must have an unusual use case I'd like > to hear about. In summary, the perf impact sticks out because of the number of custom levels and the size of the config. It is only a one time impact (as you say, only during init()), but if you have a sizable configuration, generate_is_xxx_codref will eventually bubble up to the top of your dprofpp output for things like getting a usage statement. Gory details below... After analysis, it turns out that adding custom levels (I know, it's discouraged!) significantly increases the number of calls to generate_is_xxx_coderef(). I would estimate it's about 50 calls per level - This has to do with the complexity of my log configuration. If I reduce the complexity, that number, 50, goes down. Interesting as well, we start at over 200 calls to this subroutine just when calling a plain init() (no extra custom levels, again config complexity is the factor). Here is the profile total before the patch: 15.2 0.059 0.059 203 0.0003 0.0003 Log::Log4perl::Logger::generate_is_xxx_coderef Here is the profile after the patch: 0.00 - -0.001 203 - - Log::Log4perl::Logger::generate_is_xxx_coderef Ordinarily, 5 100ths of a seconds, wouldn't bother me. Although, 15% of the time of the small test program is a lot. But look what happens when I put in my extra levels (I have a lot to facilitate the replacement of both our old logging system and our old debugging system, which had this notion of levels that couldn't be easily integrated into categories -- for new things I'm using categories). $ dprofpp -g Log::Log4perl::Logger::generate_is_xxx_coderef Total Elapsed Time = 0.524141 Seconds User+System Time = 0.117070 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 99.9 0.117 0.117 651 0.0002 0.0002 Log::Log4perl::Logger::generate_is_xxx_coderef $ That line goes to near 0 when I apply the patch. All that was on my small test program that simply initialized. If I look at the real world, it is between 11-20% of the initialization time of my scripts was spent in this function, depending on the script. That was anywhere from .1 to .3 seconds wasted during every program run, depending on the speed of the system. Also, as the complexity of my log config grows the number will only increase. That improvement isn't "earth-shattering" but every little bit counts when talking about oft used command-line programs. :) -- David Britton |
From: Mike S. <m...@pe...> - 2005-09-20 05:37:07
|
On Tue, 23 Aug 2005, Thalhammer, Jeffrey BGI SF wrote: > My team is eager to adopt log4perl, but we don't agree on how to > integrate it with our system. In your experience, how do most people > it? Do they create wrappers, make subclasses, or just use native > log4perl interface? What criteria do they use for making that > decision? Thanks. Hi Jeffrey, sorry for the long wait. I've seen several approaches to people using Log::Log4perl. I've seen people using wrapper classes when they felt they needed to be independent of a specific logging module, but most of the time it's just used right out of the box. I personally use L4p's :easy mode almost exclusively now in all projects, small or large. It has no performance overhead and I find it much easier to type. And having a concise syntax without redundancies goes a long way towards avoiding bugs and making your code easier to read for you, your team, and the guy maintaining the code six months down the road (maybe you again). -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2005-09-20 05:17:41
|
On Mon, 19 Sep 2005, David Britton wrote: > I noticed a perf bottleneck in one of the methods when doing a profile > of my code. I have attched the patch. Basically, there was an > uncessary eval/etc going on in the case where we were not in an > init_and_watch situation. Since this method tends to be called a lot, > it added up into a lot of cumulative seconds (during initialization). Thanks for the patch, it's been applied and will be released with 1.01. The patch will increase performance only during init(), you must be calling init() fairly often to see a difference. Since init() should only be called at startup, you must have an unusual use case I'd like to hear about. Thanks! -- Mike Mike Schilli m...@pe... |
From: David B. <dp...@hp...> - 2005-09-19 20:31:57
|
Hi, Thanks for the great product. Obviously a lot of great effort has gone into this module. I noticed a perf bottleneck in one of the methods when doing a profile of my code. I have attched the patch. Basically, there was an uncessary eval/etc going on in the case where we were not in an init_and_watch situation. Since this method tends to be called a lot, it added up into a lot of cumulative seconds (during initialization). -- David Britton |
From: Mike S. <m...@pe...> - 2005-09-16 08:00:18
|
On Wed, 14 Sep 2005, Robert Krimen wrote: > Just wanted to drop a note and say thanks for the good work. > > I've used both log4j and log4perl, and log4perl takes the great ideas of > log4j and combines it with the power and flexibility of perl. Hey, thanks a lot, we appreciate this kind of feedback ;) -- Mike Mike Schilli m...@pe... |
From: Robert K. <ro...@br...> - 2005-09-14 18:01:05
|
Just wanted to drop a note and say thanks for the good work. I've used both log4j and log4perl, and log4perl takes the great ideas of log4j and combines it with the power and flexibility of perl. Cheers, Rob |
From: Chris A. <ch...@nu...> - 2005-09-11 05:20:08
|
Mike Schilli wrote: >On Fri, 9 Sep 2005, Chris Anderson wrote: > > > >>It looks rather simple to filter based on a level, however with each >>child dynamically needing a different filename while main initializes >>I'm not clear on how the filter would need to be setup. >> >> > >Alternatively, you could have the child change its appender file: > > use Log::Log4perl qw(:easy); > > my $conf = q( > log4perl.category = DEBUG, Logfile > log4perl.appender.Logfile = Log::Log4perl::Appender::File > log4perl.appender.Logfile.filename = test.log > log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout > log4perl.appender.Logfile.layout.ConversionPattern = %d %F{1} %L> %m %n > ); > > Log::Log4perl->init(\$conf); > > for(1..3) { > my $pid = fork(); > > die "Can't fork" unless defined $pid; > > if($pid == 0) { > # Child, switch appender file to test.log.PID > my $app = Log::Log4perl->appender_by_name("Logfile"); > my $old = $app->filename(); > $app->file_switch($app->filename() . ".$$"); > > DEBUG "Child $$"; > sleep (3); > exit; > } > } > > print "parent\n"; > wait() for (1..5); > print "Done.\n"; > > > ah, that clears things up very well. Thank you. >-- Mike > >Mike Schilli >m...@pe... > > |
From: Mike S. <m...@pe...> - 2005-09-11 00:21:31
|
On Sat, 10 Sep 2005, Mike Schilli wrote: > Alternatively, you could have the child change its appender file: Or, you could even write your own file appender. This way, things like init_and_watch() will still work: ###################### # FileTrunkappender.pm ###################### package FileTrunkAppender; use base "Log::Log4perl::Appender::File"; sub new { my($class, @options) = @_; my $self = { name => "unknown name", umask => undef, autoflush => 1, mode => "append", @options, }; die "Mandatory parameter 'filename_trunk' missing" unless exists $self->{filename_trunk}; bless $self, $class; } sub log { my($self, @args) = @_; if(! exists $self->{filename} or ! -f $self->{filename}) { $self->{filename} = $self->{filename_trunk} . ".$$"; $self->file_open(); } $self->SUPER::log(@args); } 1; ###################### # test.pl ###################### use Log::Log4perl qw(:easy); my $conf = q( log4perl.category = DEBUG, Logfile log4perl.appender.Logfile = FileTrunkAppender log4perl.appender.Logfile.filename_trunk = test.log log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Logfile.layout.ConversionPattern = %d %F{1} %L> %m %n ); Log::Log4perl->init(\$conf); for(1..3) { my $pid = fork(); die "Can't fork" unless defined $pid; if($pid == 0) { DEBUG "Child $$"; sleep (3); exit; } } print "parent\n"; wait() for (1..5); print "Done.\n"; -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2005-09-10 21:18:23
|
On Fri, 9 Sep 2005, Chris Anderson wrote: > It looks rather simple to filter based on a level, however with each > child dynamically needing a different filename while main initializes > I'm not clear on how the filter would need to be setup. Alternatively, you could have the child change its appender file: use Log::Log4perl qw(:easy); my $conf = q( log4perl.category = DEBUG, Logfile log4perl.appender.Logfile = Log::Log4perl::Appender::File log4perl.appender.Logfile.filename = test.log log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Logfile.layout.ConversionPattern = %d %F{1} %L> %m %n ); Log::Log4perl->init(\$conf); for(1..3) { my $pid = fork(); die "Can't fork" unless defined $pid; if($pid == 0) { # Child, switch appender file to test.log.PID my $app = Log::Log4perl->appender_by_name("Logfile"); my $old = $app->filename(); $app->file_switch($app->filename() . ".$$"); DEBUG "Child $$"; sleep (3); exit; } } print "parent\n"; wait() for (1..5); print "Done.\n"; -- Mike Mike Schilli m...@pe... |
From: Chris A. <ch...@nu...> - 2005-09-09 17:30:18
|
Mike Schilli wrote: >On Fri, 9 Sep 2005, Chris Anderson wrote: > > > >>In an application where I have multiple children each needing to log to >>their own file, I've noticed using the get_logger() or init to changes >>the configuration for all the children and the parent as well. So >>effectively, when multiple processes use the same instance through >>get_logger() they all just combine in the same file. I didn't see >>anything in the documentation regarding how to handle this, so I was >>hoping someone may be able to shed some light on what I need to do to >>segregate these logging rules. >> >> > >It depends on where you call Log::Log4perl->init(). > >If it's called in each child process, then the filename can be specified >dynamically (using something like the pid): > > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#02bbc > >If Log::Log4perl->init() gets called in the main process, messages >need to be filtered dynamically, using a custom filter: > > The main process initializes Log4perl, then each child has its own log file to use. > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#c7fa8 > http://log4perl.sourceforge.net/d/Log/Log4perl/Filter.html > >Let me know if you need more detailed info. > > It looks rather simple to filter based on a level, however with each child dynamically needing a different filename while main initializes I'm not clear on how the filter would need to be setup. >-- Mike > >Mike Schilli >m...@pe... > > |
From: Mike S. <m...@pe...> - 2005-09-09 07:52:45
|
On Fri, 9 Sep 2005, Chris Anderson wrote: > In an application where I have multiple children each needing to log to > their own file, I've noticed using the get_logger() or init to changes > the configuration for all the children and the parent as well. So > effectively, when multiple processes use the same instance through > get_logger() they all just combine in the same file. I didn't see > anything in the documentation regarding how to handle this, so I was > hoping someone may be able to shed some light on what I need to do to > segregate these logging rules. It depends on where you call Log::Log4perl->init(). If it's called in each child process, then the filename can be specified dynamically (using something like the pid): http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#02bbc If Log::Log4perl->init() gets called in the main process, messages need to be filtered dynamically, using a custom filter: http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#c7fa8 http://log4perl.sourceforge.net/d/Log/Log4perl/Filter.html Let me know if you need more detailed info. -- Mike Mike Schilli m...@pe... |
From: Chris A. <ch...@nu...> - 2005-09-09 06:07:47
|
In an application where I have multiple children each needing to log to their own file, I've noticed using the get_logger() or init to changes the configuration for all the children and the parent as well. So effectively, when multiple processes use the same instance through get_logger() they all just combine in the same file. I didn't see anything in the documentation regarding how to handle this, so I was hoping someone may be able to shed some light on what I need to do to segregate these logging rules. |
From: Mike S. <m...@pe...> - 2005-09-01 00:14:56
|
On Tue, 30 Aug 2005 pl...@So... wrote: > C:\>ppm install "http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd" > > Installing package > 'http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd'... > > Downloading http://log4perl.sourceforge.net/ppm/Log-Log4perl-1.tar.gz > ... > > Error installing package > 'http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd': > > Error reading http://log4perl.sourceforge.net/ppm/Log-Log4perl-1.tar.gz Fixed, please try again. Thanks for the note! -- Mike Mike Schilli m...@pe... |
From: <pl...@So...> - 2005-08-31 00:38:11
|
C:\>ppm install "http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd" Installing package 'http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd'... Downloading http://log4perl.sourceforge.net/ppm/Log-Log4perl-1.tar.gz ... Error installing package 'http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd': Error reading http://log4perl.sourceforge.net/ppm/Log-Log4perl-1.tar.gz =20 I can only find the file Log-Log4perl.tar.gz in the log4perl.sourceforge.net/ppm directory? =20 Thanks- Pat =20 Pat Lydon Sr. QA Engineer T: +1 408.962.7048 F: +1 408.745.9300 pl...@so... www.sonicwall.com =20 |
From: Thalhammer, J. B. S. <Jef...@ba...> - 2005-08-24 04:17:48
|
My team is eager to adopt log4perl, but we don't agree on how to = integrate it with our system. In your experience, how do most people = it? Do they create wrappers, make subclasses, or just use native = log4perl interface? What criteria do they use for making that decision? = Thanks. -Jeff |
From: Mike S. <m...@pe...> - 2005-08-15 20:05:24
|
On Mon, 15 Aug 2005, Rolf Schaufelberger wrote: > I try to use Log4perl VERSION 0.52 with LogDispatch 2.10: > When I configure an appender of the Class Log::Dispatch::Email::MIMELite (or > any other Email subclass),, I get the error: > > The following parameter was passed in the call to Log::Dispatch::Email::new > but was not listed in the validation options: name > at /usr/local/lib/perl5/site_perl/5.8.6/Log/Log4perl/Appender.pm line 83 Can you send your L4p configuration file? -- Mike Mike Schilli m...@pe... |
From: Rolf S. <rs...@pl...> - 2005-08-15 14:32:11
|
Hi, I try to use Log4perl VERSION 0.52 with LogDispatch 2.10: When I configure an appender of the Class Log::Dispatch::Email::MIMELite (or any other Email subclass),, I get the error: The following parameter was passed in the call to Log::Dispatch::Email::new but was not listed in the validation options: name at /usr/local/lib/perl5/site_perl/5.8.6/Log/Log4perl/Appender.pm line 83 Although Log::Dispatch::Email sets Params::Validate::validation_options( allow_extra => 1 ); When I modify Appender.pm and delete the name param it complains with onother variabe passed in (something starting with l4_...). When I remove validate in L::D:Email.pm I get the same error from Log::Dispatch::Output. So, whats wrong here? Any idea? Rolf Schaufelberger ------------------------------------------------------------------- plusW Dipl. Ing. Rolf Schaufelberger Endersbacher Str. 57 E-Mail: rs...@pl... 71334 Waiblingen-Beinstein Mobil: 0160 - 84 039 64 Tel. 07151/ 20583-70 ,noch nicht geschaltet, bis dahin: 07151/ 20583-32 |
From: Mike S. <m...@pe...> - 2005-08-13 17:56:09
|
Hey there, Log::Log4perl enthusiasts, yes, you've read correctly: We're releasing Log::Log4perl version 1.00. What started back in 2002 has matured to a stable and widely used production framework. Now we thought it's finally time to reflect that fact in the version number. And there you have it. It's not on CPAN yet, but please download it and give it a try: http://log4perl.sourceforge.net/releases/Log-Log4perl-1.00.tar.gz It's especially important this time that no bugs are slipping through, so please help out if you can ;). Here's the list of changes: 1.00 (08/13/2005) * (ms) Added tag qw(:no_extra_logdie_message) to suppress duplicate die() messages in scripts using simple configurations and LOGDIE(). Added logexit() as an alternative way. * (ms) Fixed bug with logcarp/croak/cluck, which were using the wrong Carp level. * (kg) Fixing bug in Appender::Limit regarding $_ scope * (ms) corrected typo in Synchronized.pm found by Rob Redmon. * (ms) Fixed bug with Appender::File reported by Michael Smith. Checking now if print() succeeds, catching errors with full disks and ulimit'ed environments. * (ms) Added LOGCARP(), LOGCLUCK(), LOGCONFESS(), LOGCROAK() macros in :easy mode (suggested by Jud Dagnall). * (ms) $INITIALIZED now gets reset during logger cleanup. Have fun! -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2005-07-17 18:10:58
|
On Fri, 15 Jul 2005, Michael Smith wrote: > The essence of this bug, is that Log4Perl dies silently when writing to > a logfile larger than the users 'ulimit'. Fixed: $ diff -Nau -r 1.9 -r 1.10 lib/Log/Log4perl/Appender/File.pm diff -r1.9 -r1.10 98c98,99 < print $fh $params{message}; --- > print $fh $params{message} or > die "Cannot write to '$self->{filename}': $!"; It'll be part of the next release. Thanks again! -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2005-07-15 22:35:53
|
On Fri, 15 Jul 2005, Michael Smith wrote: > The essence of this bug, is that Log4Perl dies silently when writing to > a logfile larger than the users 'ulimit'. The reason for this is that in the file appender, print $fh $params{message}; doesn't check for errors, like a full disk or a user quota. That's clearly a bug, I'll check into it ... Thanks for the note! -- Mike Mike Schilli m...@pe... > > It manifested when I was using a script in a postfix alias > (/etc/postfix/aliases) > > test: "|/usr/local/adm/script.pl" > > I had the Log4Perl configured to send email and to write to the logfile. > > When I ran the tests by sending to the alias, I got the emails from > log4perl, but nothing was in the logfile. No exceptions or errors were > thrown. > > When I ran the script manually, it worked (I got the e-mails, and > entries in the logfile). > > The logfile at the time was 64MB, and the postfix 'message_size_limit' > was set to 20MB. > > >From what I can tell, the 'shell' that postfix spawns as user nobody, > when it executes the script, has the ulimit set to the value of the > 'message_size_limit'. > > As soon as I made it write to a new file, I got the messages in the > logfile (file had identical permissions) > > I changed it back to the old file, and didn't get messages. > > I nulled the logfile and tried again, and then I got the messages in the > logfile. > > The problem is , that Log4Perl doesn't throw any kind of exception or > error when it attempts to write to a file larger than its ulimit. > > Can this be logged as a bug, I am happy to provide any further detail > you may require > > Mike > > > --- > Of course I don't look busy.....I did it right the first time. > Please note: This email and its content are subject to the disclaimer as displayed at the |
From: Michael S. <mic...@is...> - 2005-07-15 07:10:39
|
The essence of this bug, is that Log4Perl dies silently when writing to a logfile larger than the users 'ulimit'. It manifested when I was using a script in a postfix alias (/etc/postfix/aliases)=20 test: "|/usr/local/adm/script.pl" I had the Log4Perl configured to send email and to write to the logfile. When I ran the tests by sending to the alias, I got the emails from log4perl, but nothing was in the logfile. No exceptions or errors were thrown. When I ran the script manually, it worked (I got the e-mails, and entries in the logfile).=20 The logfile at the time was 64MB, and the postfix 'message_size_limit' was set to 20MB. From what I can tell, the 'shell' that postfix spawns as user nobody, when it executes the script, has the ulimit set to the value of the 'message_size_limit'. As soon as I made it write to a new file, I got the messages in the logfile (file had identical permissions) I changed it back to the old file, and didn't get messages. I nulled the logfile and tried again, and then I got the messages in the logfile. The problem is , that Log4Perl doesn't throw any kind of exception or error when it attempts to write to a file larger than its ulimit. Can this be logged as a bug, I am happy to provide any further detail you may require Mike --- Of course I don't look busy.....I did it right the first time.=20 Please note: This email and its content are subject to the disclaimer as = displayed at the following link http://www.is.co.za/disc.asp. Should you = not have Web access, send a mail to dis...@is... and a copy will = be emailed to you. |
From: Mike S. <m...@pe...> - 2005-07-07 17:00:29
|
On Wed, 6 Jul 2005, Damien Guerin wrote: > I have the following problem : In a Perl application I would like a > log file rotation each day. To do that, I am using Log4Perl with > Dispatch FileRotate module but only rotation by size is possible. > Indeed day rotation doesn't work. > > My Log4perl configuration file : > > log4perl.appender.MSG=3DLog::Dis=C2=ADpatch::FileRotate > log4perl.appender.MSG.filename=C2=AD=3D/log/msg.log > log4perl.appender.MSG.mode=3Dapp=C2=ADend > log4perl.appender.MSG.max=3D10 > log4perl.appender.MSG.DatePatt=C2=ADern=3Dyyyy-MM-dd > log4perl.appender.MSG.layout=3DP=C2=ADatternLayout > log4perl.appender.MSG.TZ=3DGMT > log4perl.appender.MSG.layout.C=C2=ADonversionPattern=3D%d %m%n > > A rotation each minutes doesn't work too. I don't kown why? > Please, can you help me? Something's broken with Log::Dispatch::FileRotate and minutely rotation, I've filed a bug: http://rt.cpan.org/NoAuth/Bug.html?id=3D13559 -- Mike Mike Schilli m...@pe... |
From: Rob R. <Rob...@no...> - 2005-07-07 15:34:44
|
Damien, Here's a config file with working daily rotation. Hope this helps,= =20 sorry no time to help you debug yours... Cheers, Rob #log.conf log4perl.logger.Ionosonde=3DDEBUG, Logfile log4perl.appender.Logfile=3DLog::Dispatch::FileRotate log4perl.appender.Logfile.filename=3Dlog/load_sec.log log4perl.appender.Logfile.mode=3Dappend log4perl.appender.Logfile.layout=3DLog::Log4perl::Layout::PatternLayo= ut log4perl.appender.Logfile.layout.ConversionPattern=3D%d %p>=20 %F{1}(pid=3D%P):%L %M - %m%n log4perl.appender.Logfile.max=3D366 #have to choose by size or date, not both: #log4perl.appender.Logfile.size=3D1 log4perl.appender.Logfile.DatePattern =3D yyyy-MM-dd log4perl.appender.Logfile.TZ =3D MST Damien Guerin wrote: > Hi, > =20 > I have the following problem : > In a Perl application I would like a log file rotation each day. > To do that, I am using Log4Perl with Dispatch FileRotate module but= =20 > only rotation by size is possible. Indeed day rotation doesn't work= . > =20 > My Log4perl configuration file : > =20 > log4perl.appender.MSG=3DLog::Dis=C2=ADpatch::FileRotate > log4perl.appender.MSG.filename=C2=AD=3D/log/msg.log > log4perl.appender.MSG.mode=3Dapp=C2=ADend > log4perl.appender.MSG.max=3D10 > log4perl.appender.MSG.DatePatt=C2=ADern=3Dyyyy-MM-dd > log4perl.appender.MSG.layout=3DP=C2=ADatternLayout > log4perl.appender.MSG.TZ=3DGMT > log4perl.appender.MSG.layout.C=C2=ADonversionPattern=3D%d %m%n > =20 > A rotation each minutes doesn't work too. I don't kown why? > Please, can you help me? > =20 > Regards, > Damien. --=20 Rob Redmon NOAA/NGDC 325 Broadway E/GC2 Boulder, Colorado 80305 Tel: (303) 497-4331 Fax: (303) 497-6513 Rob...@no... "Engineering is the art of making what you want from things you can g= et."=20 |
From: Damien G. <dam...@at...> - 2005-07-06 14:40:12
|
Hi,=20 I have the following problem : In a Perl application I would like a log file rotation each day.=20 To do that, I am using Log4Perl with Dispatch FileRotate module but only ro= tation by size is possible. Indeed day rotation doesn't work. My Log4perl configuration file : log4perl.appender.MSG=3DLog::Dis=C2=ADpatch::FileRotate=20 log4perl.appender.MSG.filename=C2=AD=3D/log/msg.log=20 log4perl.appender.MSG.mode=3Dapp=C2=ADend=20 log4perl.appender.MSG.max=3D10=20 log4perl.appender.MSG.DatePatt=C2=ADern=3Dyyyy-MM-dd log4perl.appender.MSG.layout=3DP=C2=ADatternLayout=20 log4perl.appender.MSG.TZ=3DGMT=20 log4perl.appender.MSG.layout.C=C2=ADonversionPattern=3D%d %m%n=20 A rotation each minutes doesn't work too. I don't kown why? Please, can you help me? Regards, Damien. |
From: Mike S. <m...@pe...> - 2005-07-06 01:42:40
|
On Tue, 5 Jul 2005, Rob Redmon wrote: > I'm new to log4perl/log4j. My goal is to have a few different running > perl programs write to the same log file, perhaps simultaneously. To > test that ability, I wrote the simple perl program and log given below. > Then I kicked off (i.e. bash> test_log4perl.pl &) the perl program 10 > times so they'd all be running simultaneously. I noticed in my > resulting log file that the filename %F is occasionally given as "(eval > 61)" and the method name is shown as "Log::Log4perl::Logger::__ANON__". > Specifically, I'm expecting this log message: > 2005/07/05 13:18:10 INFO > test_log4perl.pl(pid=24623):30 main:: - i= > 988 slept for 0 of 0 seconds > > And occasionally, I'm getting one like this: > 2005/07/05 12:25:18 INFO > (eval 61)(pid=24263):42 > Log::Log4perl::Logger::__ANON__ - i= 243 slept for 1.64915744429506 of 1 > seconds Hi Rob, I'm not entirely sure why you're getting "eval" as the file name (are you modifying the conf file while you're running the test?), but to sychronize access to a single log file used by multiple processes, please use the method described in http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 -- Mike Mike Schilli m...@pe... > Hi, > > I'm new to log4perl/log4j. My goal is to have a few different running > perl programs write to the same log file, perhaps simultaneously. To > test that ability, I wrote the simple perl program and log given below. > Then I kicked off (i.e. bash> test_log4perl.pl &) the perl program 10 > times so they'd all be running simultaneously. I noticed in my > resulting log file that the filename %F is occasionally given as "(eval > 61)" and the method name is shown as "Log::Log4perl::Logger::__ANON__". > Specifically, I'm expecting this log message: > 2005/07/05 13:18:10 INFO > test_log4perl.pl(pid=24623):30 main:: - i= > 988 slept for 0 of 0 seconds > > And occasionally, I'm getting one like this: > 2005/07/05 12:25:18 INFO > (eval 61)(pid=24263):42 > Log::Log4perl::Logger::__ANON__ - i= 243 slept for 1.64915744429506 of 1 > seconds > > The log config and perl program follow. Any help appreciated! > > ######## log config ######### > # > # Author: Rob Redmon > # Rob...@no... > # > log4perl.logger.Ionosonde=DEBUG, Logfile > log4perl.appender.Logfile=Log::Dispatch::FileRotate > log4perl.appender.Logfile.filename=log/load_sec.log > log4perl.appender.Logfile.mode=append > log4perl.appender.Logfile.layout=Log::Log4perl::Layout::PatternLayout > log4perl.appender.Logfile.layout.ConversionPattern=%d %p > > %F{1}(pid=%P):%L %M - %m%n > log4perl.appender.Logfile.max=366 > #have to choose by size or date, not both: > #log4perl.appender.Logfile.size=1 > log4perl.appender.Logfile.DatePattern = yyyy-MM-dd > log4perl.appender.Logfile.TZ = MST > > > ######## simple perl ######## > #!/usr/bin/perl > > use strict; > use warnings; > use lib '../../lib/perl'; > > use IO::Dir; > #use Log::Log4perl qw(:easy); > use Log::Log4perl qw(get_logger :levels); > > local *__ANON__ = "test_log4perl.pl"; > > #Log::Log4perl->easy_init($INFO); > Log::Log4perl->init_and_watch("log.conf", 60); #recheck config file > every 60 seconds > > ##### > # Config > ##### > my $logger = get_logger("Ionosonde"); > $logger->level($DEBUG); > > ##### > # Test > ##### > $logger->info("Testing log4perl: START"); > > for (my $i=0; $i<1000; $i++) { > my $t_sec = rand(2); > my $n_sec = sleep($t_sec); > $logger->info("i= ",$i," slept for ",$t_sec," of ",$n_sec," seconds"); > } > > $logger->info("Testing log4perl: END"); > > -- > Rob Redmon > NOAA/NGDC > 325 Broadway E/GC2 > Boulder, Colorado 80305 > Tel: (303) 497-4331 > Fax: (303) 497-6513 > Rob...@no... > > "Engineering is the art of making what you want from things you can get." > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |