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: Oladipo, S. <Seg...@ci...> - 2009-07-06 19:18:44
|
Hello, Need to install Log4perl but stuck behind a firewall. Obtained information that it is possible to download the zipped file to a local repository and install using ppm. The question is I can't seem to find Log-Log4perl.ppd anywhere as the following link seems to be inactive. http://log4perl.sourceforge.net/ppm/Log-Log4perl.ppd Please advise. Thanks for help in advance. Segun Oladipo | Snr Application Developer - IMDS I CIBC Global Operations & INTRIA | T:905-502-4926 | seg...@ci...<mailto:seg...@ci...> |
From: Mike S. <m...@pe...> - 2009-05-30 04:03:20
|
On Fri, 29 May 2009, Jean-Denis Muys wrote: > I am a relative newbie and I hope I ask in the right place. Sure. > A similar idiom seems to work also for Log4Perl config file: > use FindBin; > Log::Log4perl::init("$FindBin::Bin/KConfig.conf"); > Is this the correct and idiomatic way to solve my issue? If you can't rely on an absolute path, that's a good way to find it. > The only other way I can see is to change at start time the Cwd to be > $FindBin::Bin (or some equivalent parsed from $0). I wouldn't use a relative path for the Log4perl configuration, you might hit problems down the road if the program chdir()s somewhere else and a reload via init_and_watch() or similar is required. Using the absolute path like you did above is better. > The FAQ solution did not work, because I had an additional line at the top > of my .conf file reading: > log4perl.threshold = INFO > And then my FATAL log file was also clobbered by all messages of level INFO > or higher. Ah, good find, that's a bug. The system-wide threshold is not supposed to lower appender thresholds. Here's the fix: http://github.com/mschilli/log4perl/commit/a98bbfb82025098779b8cb73eec4870a06ffdec7 I'll go out in the next (1.24) release. Thanks for reporting this. -- Mike Mike Schilli m...@pe... |
From: Jean-Denis M. <jd...@kl...> - 2009-05-29 10:04:18
|
Hi, I am a relative newbie and I hope I ask in the right place. The problem is that Log4perl doesn't find the .conf file when the current directory is not where the .conf file is. My Perl package is delivered as a directory with the main file DXMain.pl and all its private modules, including my KConfig.conf Log4Perl configuration file. I have no way to know in advance where the end-user is going to put this directory in the file system (nor is it appropriate to impose it). Log4Perl is initialized with: Log::Log4perl::init('KConfig.conf'); If the user 'chdir' into this directory before running the main file, all is well: KConfig.conf is found just fine. However, the user can also call me from another directory using a qualified path, eg 'perl /path/to/DXMain.pl parameters'. Then the initialization line above breaks, as the config file cannot be found. I have a similar issue with my "use" statements for my private modules, which I was able to solve using an idiom like: use FindBin; use lib "$FindBin::Bin"; A similar idiom seems to work also for Log4Perl config file: use FindBin; Log::Log4perl::init("$FindBin::Bin/KConfig.conf"); Is this the correct and idiomatic way to solve my issue? The only other way I can see is to change at start time the Cwd to be $FindBin::Bin (or some equivalent parsed from $0). As an unrelated issue, I had a hard time using the appender threshold feature to implement the FAQ " How can I collect all FATAL messages in an extra log file?". The FAQ solution did not work, because I had an additional line at the top of my .conf file reading: log4perl.threshold = INFO And then my FATAL log file was also clobbered by all messages of level INFO or higher. Contrary to [my understanding of] what the doc says, setting the system wide log4perl.threshold doesn't only remove all messages of lower priority, it also in effect disables all appender thresholds, even if they are more selective. Is this the intent? This tends to defeat the purpose of log4perl.threshold IMHO. Best regards and thanks, Jean-Denis |
From: Mike S. <m...@pe...> - 2009-05-27 14:17:41
|
On Tue, 26 May 2009, Richard Burton wrote: > Currently the whole script gets in to a recursive mess, the file > logging.conf contains a simple root logger which outputs to the > screen, I have attached it but I suspect it is not of any use. I guess your logging.conf file looks like log4perl.category = DEBUG, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen which means that Log4perl logs to the Screen appender, which logs to STDERR by default. But you're trapping STDERR, which is then rerouted to Log4perl, which prints it to STDERR, which ... recursion. Adding log4perl.appender.Screen.stderr = 0 to route Screen messages to STDOUT instead of STDERR breaks the cycle. -- Mike Mike Schilli m...@pe... > > > > ##################################################### > #!/usr/bin/perl -w > use strict; > > use Log::Log4perl qw( get_logger :levels ); > use Log::Log4perl::Level; > > main(); > > sub main { > > Log::Log4perl->init_once('logging.conf'); > > my $log = Log::Log4perl->get_logger(''); > tie *STDERR, "Trapper"; > $log->info("This is an informational"); > $log->error("This is an error"); > IgnorantModule::some_method(); > > } > > > ######################################## > package IgnorantModule; > ######################################## > > sub some_method { > print STDERR "Parbleu! An error!\n"; > } > > 1; > > > ######################################## > package Trapper; > ######################################## > > use Log::Log4perl qw( get_logger :levels ); > > sub TIEHANDLE { > my $class = shift; > bless [], $class; > } > > sub PRINT { > my $self = shift; > > $Log::Log4perl::caller_depth++; > get_logger()->info(@_); > $Log::Log4perl::caller_depth--; > } > > 1; > ##################################################### > > > > Thanks > > Richard > > >> -----Original Message----- >> From: Mike Schilli [mailto:m...@pe...] >> Sent: 20 May 2009 22:25 >> To: Richard Burton >> Cc: log...@li... >> Subject: Re: [log4perl-devel] Log4perl and catching unhandle >> exceptions but not using 'easy' mode >> >> On Wed, 20 May 2009, Richard Burton wrote: >> >>> I can catch this using stealth as loggers outlined in >>> >> http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl >> /FAQ.pm#So >>> >> me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_ >> Log::Log4p >>> erl? >>> >>> but the example assumes you are using the "easy" >> configuration method. >> >> Actually, this will work unmodified if you're using a >> configuration file >> instead. >> >> You're probably talking about the DEBUG(...) macro used in the code >> example, which comes with :easy, but this is really unrelated to >> easy_init() and can be used with init($conf_file) as well. >> If you don't want the stealth loggers, get a logger and send >> your debug >> message via >> >> use Log::Log4perl qw(get_logger); >> >> get_logger()->debug("my debug message"); >> >> instead. >> >>> The question I have is can I do a similar thing but use an external >>> configuration file for log4perl? I have tried but failed so would >>> appreciate any guidance? >> >> This should work, what was the problem/error message you encountered? >> >> -- Mike >> >> Mike Schilli >> m...@pe... >> > |
From: Richard B. <ri...@at...> - 2009-05-26 16:52:09
|
Hi Mike Firstly thanks for the help your help so far.. I think I am almost seeing the light, my only question now is actually outputting the log text, below is my test script, could you outline what I should be putting for the line :- get_logger()->info(@_) in the PRINT method of package Trapper; Currently the whole script gets in to a recursive mess, the file logging.conf contains a simple root logger which outputs to the screen, I have attached it but I suspect it is not of any use. ##################################################### #!/usr/bin/perl -w use strict; use Log::Log4perl qw( get_logger :levels ); use Log::Log4perl::Level; main(); sub main { Log::Log4perl->init_once('logging.conf'); my $log = Log::Log4perl->get_logger(''); tie *STDERR, "Trapper"; $log->info("This is an informational"); $log->error("This is an error"); IgnorantModule::some_method(); } ######################################## package IgnorantModule; ######################################## sub some_method { print STDERR "Parbleu! An error!\n"; } 1; ######################################## package Trapper; ######################################## use Log::Log4perl qw( get_logger :levels ); sub TIEHANDLE { my $class = shift; bless [], $class; } sub PRINT { my $self = shift; $Log::Log4perl::caller_depth++; get_logger()->info(@_); $Log::Log4perl::caller_depth--; } 1; ##################################################### Thanks Richard > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...] > Sent: 20 May 2009 22:25 > To: Richard Burton > Cc: log...@li... > Subject: Re: [log4perl-devel] Log4perl and catching unhandle > exceptions but not using 'easy' mode > > On Wed, 20 May 2009, Richard Burton wrote: > > > I can catch this using stealth as loggers outlined in > > > http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl > /FAQ.pm#So > > > me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_ > Log::Log4p > > erl? > > > > but the example assumes you are using the "easy" > configuration method. > > Actually, this will work unmodified if you're using a > configuration file > instead. > > You're probably talking about the DEBUG(...) macro used in the code > example, which comes with :easy, but this is really unrelated to > easy_init() and can be used with init($conf_file) as well. > If you don't want the stealth loggers, get a logger and send > your debug > message via > > use Log::Log4perl qw(get_logger); > > get_logger()->debug("my debug message"); > > instead. > > > The question I have is can I do a similar thing but use an external > > configuration file for log4perl? I have tried but failed so would > > appreciate any guidance? > > This should work, what was the problem/error message you encountered? > > -- Mike > > Mike Schilli > m...@pe... > |
From: Mike S. <m...@pe...> - 2009-05-22 03:35:32
|
On Thu, 21 May 2009, Richard Burton wrote: > It is more of a general question so that I can build it in to my code; > I don't have a specific example? Maybe I misunderstood, but you said "I have tried but failed", and from what I saw, you're doing everything correctly. -- Mike Mike Schilli m...@pe... > > Does that help? > > Richard > >> -----Original Message----- >> From: Mike Schilli [mailto:m...@pe...] >> Sent: 20 May 2009 22:25 >> To: Richard Burton >> Cc: log...@li... >> Subject: Re: [log4perl-devel] Log4perl and catching unhandle >> exceptions but not using 'easy' mode >> >> On Wed, 20 May 2009, Richard Burton wrote: >> >>> I can catch this using stealth as loggers outlined in >>> >> http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl >> /FAQ.pm#So >>> >> me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_ >> Log::Log4p >>> erl? >>> >>> but the example assumes you are using the "easy" >> configuration method. >> >> Actually, this will work unmodified if you're using a >> configuration file >> instead. >> >> You're probably talking about the DEBUG(...) macro used in the code >> example, which comes with :easy, but this is really unrelated to >> easy_init() and can be used with init($conf_file) as well. >> If you don't want the stealth loggers, get a logger and send >> your debug >> message via >> >> use Log::Log4perl qw(get_logger); >> >> get_logger()->debug("my debug message"); >> >> instead. >> >>> The question I have is can I do a similar thing but use an external >>> configuration file for log4perl? I have tried but failed so would >>> appreciate any guidance? >> >> This should work, what was the problem/error message you encountered? >> >> -- Mike >> >> Mike Schilli >> m...@pe... >> > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://www.creativitycat.com > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Richard B. <ri...@at...> - 2009-05-21 11:35:42
|
Hi Mike All I am trying to do is to write unhandled exceptions to file, e.g. I am using a package off CPAN that explodes in a horrible way but as the exception is internal to the package I may not have the relevant error checking in place to catch the error? It is more of a general question so that I can build it in to my code; I don't have a specific example? Does that help? Richard > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...] > Sent: 20 May 2009 22:25 > To: Richard Burton > Cc: log...@li... > Subject: Re: [log4perl-devel] Log4perl and catching unhandle > exceptions but not using 'easy' mode > > On Wed, 20 May 2009, Richard Burton wrote: > > > I can catch this using stealth as loggers outlined in > > > http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl > /FAQ.pm#So > > > me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_ > Log::Log4p > > erl? > > > > but the example assumes you are using the "easy" > configuration method. > > Actually, this will work unmodified if you're using a > configuration file > instead. > > You're probably talking about the DEBUG(...) macro used in the code > example, which comes with :easy, but this is really unrelated to > easy_init() and can be used with init($conf_file) as well. > If you don't want the stealth loggers, get a logger and send > your debug > message via > > use Log::Log4perl qw(get_logger); > > get_logger()->debug("my debug message"); > > instead. > > > The question I have is can I do a similar thing but use an external > > configuration file for log4perl? I have tried but failed so would > > appreciate any guidance? > > This should work, what was the problem/error message you encountered? > > -- Mike > > Mike Schilli > m...@pe... > |
From: Mike S. <m...@pe...> - 2009-05-21 07:16:07
|
On Wed, 20 May 2009, Robert Jacobson wrote: > Here's what I did: 1. Make a file "trapper.pl". It's basically the > same as the example, except the Log4perl init, which uses a config > file (in this case, with a SIGHUP to re-read it): Looks ok at first glance, doesn't it produce the expected output? Please post the complete (runnable) code to make it easier to diagnose the problem. -- Mike Mike Schilli m...@pe... > > ######################################## > package Trapper; > ######################################## > > use Log::Log4perl qw(get_logger :levels); > > Log::Log4perl->init_and_watch("../log4perl.conf",'HUP'); > my $logger = get_logger("program.category"); > > > sub TIEHANDLE { > ... [etc] > > 2. In my perl program: > require "trapper.pl"; > tie (*STDERR, 'Trapper'); > > > HTH, > Rob > > > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://www.creativitycat.com > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Robert J. <yad...@sn...> - 2009-05-20 21:51:58
|
Richard Burton richard-at-atomwide.com |log4perl_sourceforge| wrote: > Hi all > > I am trying to capture unhandled exceptions that are sent to STDERR, > e.g. for example the following could would give such an error [snip] > > I can catch this using stealth as loggers outlined in > > http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#So > me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_Log::Log4p > erl? > > but the example assumes you are using the "easy" configuration method. > > The question I have is can I do a similar thing but use an external > configuration file for log4perl? I have tried but failed so would > appreciate any guidance? Here's what I did: 1. Make a file "trapper.pl". It's basically the same as the example, except the Log4perl init, which uses a config file (in this case, with a SIGHUP to re-read it): ######################################## package Trapper; ######################################## use Log::Log4perl qw(get_logger :levels); Log::Log4perl->init_and_watch("../log4perl.conf",'HUP'); my $logger = get_logger("program.category"); sub TIEHANDLE { ... [etc] 2. In my perl program: require "trapper.pl"; tie (*STDERR, 'Trapper'); HTH, Rob |
From: Mike S. <m...@pe...> - 2009-05-20 21:25:57
|
On Wed, 20 May 2009, Richard Burton wrote: > I can catch this using stealth as loggers outlined in > http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#So > me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_Log::Log4p > erl? > > but the example assumes you are using the "easy" configuration method. Actually, this will work unmodified if you're using a configuration file instead. You're probably talking about the DEBUG(...) macro used in the code example, which comes with :easy, but this is really unrelated to easy_init() and can be used with init($conf_file) as well. If you don't want the stealth loggers, get a logger and send your debug message via use Log::Log4perl qw(get_logger); get_logger()->debug("my debug message"); instead. > The question I have is can I do a similar thing but use an external > configuration file for log4perl? I have tried but failed so would > appreciate any guidance? This should work, what was the problem/error message you encountered? -- Mike Mike Schilli m...@pe... |
From: Richard B. <ri...@at...> - 2009-05-20 16:52:39
|
Hi all I am trying to capture unhandled exceptions that are sent to STDERR, e.g. for example the following could would give such an error my $test = 'foo'; if ($test == 55) { } gives Argument "foo" isn't numeric in numeric eq (==) at.... I can catch this using stealth as loggers outlined in http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#So me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_Log::Log4p erl? but the example assumes you are using the "easy" configuration method. The question I have is can I do a similar thing but use an external configuration file for log4perl? I have tried but failed so would appreciate any guidance? Thanks Richard |
From: Mike S. <m...@pe...> - 2009-05-19 02:08:40
|
On Mon, 18 May 2009, Jonathan Swartz wrote: > Is it possible to log a category to two appenders, but at different > levels? e.g. > > log4perl.logger.Foo = INFO, appender1 > log4perl.logger.Foo = DEBUG, appender2 > # Define appender1 and appender2 here That won't work, you need to do it this way: http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#I_want_to_log_ERROR_and_WARN_messages_to_different_files!_How_can_I_do_that? -- Mike Mike Schilli m...@pe... |
From: Jonathan S. <sw...@po...> - 2009-05-18 23:02:52
|
Is it possible to log a category to two appenders, but at different levels? e.g. log4perl.logger.Foo = INFO, appender1 log4perl.logger.Foo = DEBUG, appender2 # Define appender1 and appender2 here This gives an error "log4perl.logger.Foo redefined". Thanks Jon |
From: Mike S. <m...@pe...> - 2009-05-14 07:36:16
|
On Thu, 14 May 2009, Ben Humphreys wrote: > I've been using Log4perl for a while now and it seems to work fine for > me, I just wanted to make sure all tests pass so I can distribute it > to everyone here having to use VMS. Nice! :) > I've used File::Spec a bit before, and I thought to return a filename > you need to use File::Spec->catfile(dir, filename); I changed this to > catfile instead of catdir and the tests passed. That was a bug, I went ahead and fixed it on github: http://github.com/mschilli/log4perl/commit/3dc6119c07e52c58a40f58ba308c6e3b547d4f7a > Other errors seem to be caused by getting the filename through the > PatternLayout, and some File Locking issues. I'm looking into those > now. Keep 'em coming! :) Thanks for your contribution(s). -- Mike Mike Schilli m...@pe... |
From: Ben H. <bhu...@fa...> - 2009-05-14 01:08:50
|
Hi, I've been using Log4perl for a while now and it seems to work fine for me, I just wanted to make sure all tests pass so I can distribute it to everyone here having to use VMS. I realise this request might seem for a very small number of users, but I think one of the bugs I found is winder than just VMS The first bug I found I think is cross-platform. The test results were: s4:[bhumphreys.perl.log4perl.log.t]002logger.t..........63/70 Can't open S4:[BHUMPHREYS.l4p-tmpfile-1433546570-140904] (no such file or d # Looks like you planned 70 tests but ran 68. # Looks like your test exited with 256 just after 68. I don't know if you're familiar with VMS paths, but "S4:[BHUMPHREYS.l4p-tmpfile-1433546570-140904]" is a directory . The method it uses, Log::Log4perl::Util::tmpfile_name seems to return the results of File::Spec::catdir. Line 50: my $name = File::Spec->catdir(File::Spec->tmpdir(), 'l4p-tmpfile-' . "$$-" . int(rand(9999999))); I've used File::Spec a bit before, and I thought to return a filename you need to use File::Spec->catfile(dir, filename); I changed this to catfile instead of catdir and the tests passed. Is this a bug? Or desired behaviour? I would have thought this would fail on Unix too. Other errors seem to be caused by getting the filename through the PatternLayout, and some File Locking issues. I'm looking into those now. I would really appreciate some feedback on this. Ben |
From: Mike S. <m...@pe...> - 2009-05-13 07:44:11
|
Log4perl enthusiasts, wh..at, another release? You heard right. Maybe it's the new repository location on Github, but lately the bug reports and patch requests keep trickling in steadily, so here's the next batch of long-awaited fixes: 1.23 (2009/05/12) * (ms) DBI-1.608 removed a DBD::File 'feature' that allowed leaving out parameters in a bound execute(). This caused the test suite to fail (http://groups.google.com/group/perl.cpan.- testers/browse_thread/thread/af1f5c875165c387). Fixed the test cases to pass the correct number of parameters every time. * (ms) Better error message in the DBI appender on bad SQL, missing bind parameters, or other execute() errors. * (ms) Made DBI test suite more robust against preexisting conditions * (ms) Added force_next_check() for init_and_watch(), cleaned up Config::Watcher code. * (ms) Fixed test suite to run on Strawberry Perl on Win32 (reported by kmx on https://rt.cpan.org/Ticket/Display.html?id=45983) * (ms) Added 'utf8' option to screen appender and easy mode, some of it suggested in http://rt.cpan.org/Public/Bug/Display.html?id=36673 by Shantanu Bhadoria. Off to CPAN, enjoy! -- Mike Mike Schilli m...@pe... |
From: Seth D. <log...@se...> - 2009-05-09 23:55:43
|
On Sat, May 09, 2009 at 04:51:47PM -0700, Mike Schilli wrote: > On Sat, 9 May 2009, Seth Daniel wrote: > >> I was hoping for a solution that didn't burn two signals. I'm already >> using the most obvious signals: HUP, USR1, USR2, KILL, QUIT, etc... >> so I'm not exactly overflowing with extra signals. :o) > > I see ... in the next version of Log4perl (1.23), you'll be able to call > > Log::Log4perl::Config->watcher->force_next_check(); > > instead of using a signal: > > http://github.com/mschilli/log4perl/commit/6c8609f1ba064d3f781769cb9e1b45638f3daa75 > > (will probably go out soon). That's fantastic. Thank you Mike. -- seth /\ sethdaniel.org |
From: Mike S. <m...@pe...> - 2009-05-09 23:52:23
|
On Sat, 9 May 2009, Seth Daniel wrote: > I was hoping for a solution that didn't burn two signals. I'm already > using the most obvious signals: HUP, USR1, USR2, KILL, QUIT, etc... > so I'm not exactly overflowing with extra signals. :o) I see ... in the next version of Log4perl (1.23), you'll be able to call Log::Log4perl::Config->watcher->force_next_check(); instead of using a signal: http://github.com/mschilli/log4perl/commit/6c8609f1ba064d3f781769cb9e1b45638f3daa75 (will probably go out soon). -- Mike Mike Schilli m...@pe... |
From: Seth D. <log...@se...> - 2009-05-09 07:40:02
|
On Sat, May 09, 2009 at 12:12:28AM -0700, Mike Schilli wrote: > On Fri, 8 May 2009, Seth Daniel wrote: > >> The reason for this is that I have a number of existing programs that >> use Log4perl for most logging, but some very specific logging does not >> use Log4perl. I need to be able to use a single signal to tell both >> Log4perl and the other log code to check its configuration and/or >> rewrite the log file for log rotation. > > You could use something like > > $SIG{USR2} = sub { > kill 'USR1', $$; > # ... now trigger your other logging system ... > }; > > Log::Log4perl->init_and_watch("l4p.conf", 'USR1'); > > which uses a user-defined signal handler listening to USR2. You can > add whatever other logic you need to it. When triggered, it also forwards > the signal to Log4perl's signal handler, which listens to USR1. > > Good enough? I was hoping for a solution that didn't burn two signals. I'm already using the most obvious signals: HUP, USR1, USR2, KILL, QUIT, etc... so I'm not exactly overflowing with extra signals. :o) -- seth /\ sethdaniel.org |
From: Mike S. <m...@pe...> - 2009-05-09 07:35:35
|
On Fri, 8 May 2009, Seth Daniel wrote: > The reason for this is that I have a number of existing programs that > use Log4perl for most logging, but some very specific logging does not > use Log4perl. I need to be able to use a single signal to tell both > Log4perl and the other log code to check its configuration and/or > rewrite the log file for log rotation. You could use something like $SIG{USR2} = sub { kill 'USR1', $$; # ... now trigger your other logging system ... }; Log::Log4perl->init_and_watch("l4p.conf", 'USR1'); which uses a user-defined signal handler listening to USR2. You can add whatever other logic you need to it. When triggered, it also forwards the signal to Log4perl's signal handler, which listens to USR1. Good enough? -- Mike Mike Schilli m...@pe... |
From: Seth D. <log...@se...> - 2009-05-09 00:02:45
|
Hello, What I would like to do is prevent Log4perl from setting %SIG and I would like to be the one to tell Log4perl when to reload the configuration. I do not want to use time-based delays if at all possible. So I want my code to do the signal handling and then notify Log4perl to check its configuration. The reason for this is that I have a number of existing programs that use Log4perl for most logging, but some very specific logging does not use Log4perl. I need to be able to use a single signal to tell both Log4perl and the other log code to check its configuration and/or rewrite the log file for log rotation. Is this possible? Looking at the code in Config/Watch.pm, Config.pm, and Logger.pm it looks difficult. Maybe there is a better way? Thank you. -- seth /\ sethdaniel.org |
From: Mike S. <m...@pe...> - 2009-05-05 05:54:00
|
Hi Log4perl enthusiasts, Log::Log4perl 1.22 has just been released to CPAN, with the following changes: 1.22 (2009/05/02) * (ms) is_xxx() returned true prior to L4p initialization. Fixed it and adapted test suite. * (ms) Added test cases on syswrite in recreate mode * (ms) Applied patch by Jens Berthold <log...@je...> to avoid semaphore cleanup in spawned children. * (ms) Added %m{chomp} feature, 'message_chomp_before_newline' option, and documentation on newlines and logging messages, all suggested by Tim Bunce (see PatternLayout). By the way, we're on github now, so if you want to contribute to the project, it's now easier than ever: http://github.com/mschilli/log4perl Enjoy! -- Mike Mike Schilli m...@pe... |
From: Tim B. <Tim...@po...> - 2009-04-30 17:32:21
|
Hi. How can I use different ConversionPattern values for different message levels? Tim. |
From: Andreas A. <alt...@mi...> - 2009-04-29 18:52:23
|
Hi, Am Dienstag, den 28.04.2009, 19:43 -0700 schrieb Mike Schilli: > Hope that helps! Thank you! That's a gorgeous idea to use two separate log files. If no error occured I can simply remove the file, if there was an error, then I have all the necessary information. Thanks, Andreas |
From: Mike S. <m...@pe...> - 2009-04-29 02:43:24
|
On Tue, 28 Apr 2009, Andreas Altergott wrote: > is there a possibility to increase the log level when an error occurs > and print passed logs with the increased log level? The Buffer appender implements this: http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/Appender/Buffer.pm Also, the FAQ has an entry that describes something similar: http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#How_can_I_bundle_several_log_messages_into_one? So, if you modify the "TallyAppender" described there, you could make it ring-buffer a number of messages, and trigger a flush when a higher-level error occurs. Another way of accomplishing this would be logging to two different log files, one with a high log level (e.g. ERROR) and the other one with a log level that provides you with the level of detail desired (e.g. DEBUG). With a log rotator, you can limit the amount of disk space used by the detailed log, and implement ring-buffer-like functionality this way. Hope that helps! -- Mike Mike Schilli m...@pe... > > This would be very handy if you have a server application running, with > a very low log level, to produce as less logging data as necessary. > > But once an error occurs this data is not sufficient. It would be nice > to log additionally to the stack backtrace all the passed logs with a > higher log level. > > I know that the log output would be buffered. This would mean that even > though a logging event occured there'll be no output immediately. > > There might even be security concerns because the logging data might get > lost, if the server crashes, before the buffer has been flushed. > > But nevertheless this is probably a good feature for server applications > where real time logging is not the top priority. > > > Regards, > Andreas > |