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: Dave P. <dpo...@li...> - 2014-02-28 10:32:18
|
Hi gents , Sorry to trouble you again, but this time it's an enhancement suggestion to the wonderful world of L4P, but first a little background ... whilst developing a bespoke package that uses L4P indirectly (it 'use's a package that 'use's a package to try and subclass L4P), I was seeing a carp message that pointed to the 'use' statement - in order to ascertain the exact root cause, I edited the L4P Appender.pm, in-situ, to change the carp to a cluck. My enhancement would be to select e.g. via an environment or package variable, whether carp or cluck is used to generate any warnings in order to facilitate problem resolution. Best rgds , -- Dave Pointon FIAP MBCS Now I saw, tho' too late, the folly of beginning a work before we count the cost and before we we judge rightly of our strength to go thro' with it - Robinson Crusoe |
From: Dave P. <dpo...@li...> - 2013-12-24 15:03:29
|
On Mon, 2013-12-23 at 18:03 -0800, Mike Schilli wrote: > On Mon, 23 Dec 2013, Dave Pointon wrote: > > > Would it be worthwhile to document this 'feature' in order to head off > > further such questions? > > Gah, wrong link :). I added this item to the FAQ: > > https://github.com/mschilli/log4perl/commit/18c615ec1c81d780faeff8b95f49494ad29dbcfa > > Good enough? > Good enough It's more than that, I couldn't have wished for anything better. Thanx for your help, Mike. May you and yours have a good xmas & new year. Best rgds , -- Dave Pointon FIAP MBCS Now I saw, tho' too late, the folly of beginning a work before we count the cost and before we we judge rightly of our strength to go thro' with it - Robinson Crusoe |
From: Mike S. <m...@pe...> - 2013-12-24 02:04:38
|
On Mon, 23 Dec 2013, Dave Pointon wrote: > Would it be worthwhile to document this 'feature' in order to head off > further such questions? Gah, wrong link :). I added this item to the FAQ: https://github.com/mschilli/log4perl/commit/18c615ec1c81d780faeff8b95f49494ad29dbcfa Good enough? -- -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2013-12-24 02:03:28
|
On Mon, 23 Dec 2013, Dave Pointon wrote: > Would it be worthwhile to document this 'feature' in order to head off > further such questions? I added this to the FAQ: http://feedproxy.google.com/~r/FatwalletHotDeals/~3/YyseBpP9ZeU/ Good enough? -- -- Mike Mike Schilli m...@pe... |
From: Dave P. <dpo...@li...> - 2013-12-23 21:28:21
|
Hiya Mike , On Sat, 2013-12-21 at 14:21 -0800, Mike Schilli wrote: > Hi Dave, <snip> > > Hope that helps! > Awesome, that's most definitely worth the wait. Would it be worthwhile to document this 'feature' in order to head off further such questions? Thanx for that , Best rgds , -- Dave Pointon FIAP MBCS Now I saw, tho' too late, the folly of beginning a work before we count the cost and before we we judge rightly of our strength to go thro' with it - Robinson Crusoe |
From: Mike S. <m...@pe...> - 2013-12-21 22:42:29
|
Hi Dave, you're defining different loggers, but what you really want is define different appenders attached to a single logger. A logger has a category ("" or "main" or "Foo::Bar"), which determines which package namespace to accept messages from, and a set of appenders which it forwards the message to after it determines it should be logged because it exceeds the required level threshold. Your :easy configuration defines two loggers with identical categories, which results in second logger clobbering the first one :). Unfortunately, Log4perl doesn't warn you if you do that in easy mode, had you used a configuration file to set up your configuration, Log4perl would have warned you: log4perl.category redefined at PropertyConfigurator.pm line 98. Now, unfortunately, there's no way to do what you want in easy mode, but you need to use a standard configuration file or string instead. The following snippet defines one logger, which has two appenders attached to it: use Log::Log4perl qw(:easy); Log::Log4perl->init( \<<EOT ); log4perl.logger = TRACE, Screen, File log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.layout = SimpleLayout log4perl.appender.File = Log::Log4perl::Appender::File log4perl.appender.File.filename = test.log log4perl.appender.File.layout = SimpleLayout log4perl.appender.Screen.Threshold = INFO EOT INFO "Goes to screen and file"; TRACE "Only goes to file"; The logger's level is trace, so that it forwards all messages trace and above to both appenders, but the file appender blocks everything below INFO with its threshold setting. Hope that helps! -- -- Mike Mike Schilli m...@pe... On Wed, 18 Dec 2013, Dave Pointon wrote: > Hi gents , > > I think that I'm experiencing some unexpected behaviour when using > easy_init() with multiple logger definitions (as suggested in the > perldoc), viz ... the reporting level is apparently determined by the > last of the definitions c/w being individually applicable e.g. > > With the call > > Log::Log4perl->easy_init( > { > name => 'LOG', > file => ">$LOGGER_FNAME", > layout => $log_layout, > level => $TRACE, > }, > { > name => 'SCR', > file => 'STDOUT', > layout => $log_layout, > level => $INFO, > }, > ); > > both logs i.e. STDOUT and the file, contain only INFO and above > messages, whereas the call > > Log::Log4perl->easy_init( > { > name => 'SCR', > file => 'STDOUT', > layout => $log_layout, > level => $INFO, > }, > { > name => 'LOG', > file => ">$LOGGER_FNAME", > layout => $log_layout, > level => $TRACE, > }, > ); > > results in all messages being output to both logs. > > In both of the above cases, I expected messages of INFO and above to > STDOUT and all message to the log file, so the question is: Is this a > mis-understanding on my part, or is there an actual defect here ? > > TIA & best rgds , > > |
From: Dave P. <dpo...@li...> - 2013-12-18 13:41:36
|
Hi gents , I think that I'm experiencing some unexpected behaviour when using easy_init() with multiple logger definitions (as suggested in the perldoc), viz ... the reporting level is apparently determined by the last of the definitions c/w being individually applicable e.g. With the call Log::Log4perl->easy_init( { name => 'LOG', file => ">$LOGGER_FNAME", layout => $log_layout, level => $TRACE, }, { name => 'SCR', file => 'STDOUT', layout => $log_layout, level => $INFO, }, ); both logs i.e. STDOUT and the file, contain only INFO and above messages, whereas the call Log::Log4perl->easy_init( { name => 'SCR', file => 'STDOUT', layout => $log_layout, level => $INFO, }, { name => 'LOG', file => ">$LOGGER_FNAME", layout => $log_layout, level => $TRACE, }, ); results in all messages being output to both logs. In both of the above cases, I expected messages of INFO and above to STDOUT and all message to the log file, so the question is: Is this a mis-understanding on my part, or is there an actual defect here ? TIA & best rgds , -- Dave Pointon FIAP MBCS Now I saw, tho' too late, the folly of beginning a work before we count the cost and before we we judge rightly of our strength to go thro' with it - Robinson Crusoe |
From: David C. <dpc...@ho...> - 2013-11-06 02:55:50
|
On 11/05/2013 06:17 PM, Mike Schilli wrote: Thanks for the reply, and thanks for Log::Log4perl. :-) > This was fixed in Log4perl 1.35: I suspected as much. > I wouldn't do it in the main root to avoid stepping on the package > manager's files, but if you maintain your own local directory via > local::lib that should work just fine. I use local::lib for my code, but try to use the distribution package manager for CPAN modules. If/when I must have a CPAN module that isn't packaged, I'll put it in local::lib. > Ideally, I wouldn't use the > system perl for applications in the first place, but install a separate > one via perlbrew et al. ... > Later versions of Debian seem to have more up-to-date versions of > Log4perl: I'm working on modules/ scripts to automate system configuration/ administration of Debian 7 machines. So, I'm trying to write Perl code that works with Debian 7 OOTB as much as possible. I'll go with my wrapper work-around for now. David |
From: Mike S. <m...@pe...> - 2013-11-06 02:38:08
|
On Mon, 4 Nov 2013, David Christensen wrote: > I was expecting logwarn() would always output the warning message to > the terminal, and additionally output the warning message to the log > destination if logging is enabled. Apparently, not. This was fixed in Log4perl 1.35: https://github.com/mschilli/log4perl/commit/7d7fbbb45254d6c903f5b3cb91d7 > I see that Log::Log4perl is now version 1.42 on CPAN. I'm on Debian > Stable (Wheezy), which has version 1.29. I'd rather not upgrade via > 'cpan', as I've found that circumventing Apt and the Debian release > process leads to problems. I wouldn't do it in the main root to avoid stepping on the package manager's files, but if you maintain your own local directory via local::lib that should work just fine. Ideally, I wouldn't use the system perl for applications in the first place, but install a separate one via perlbrew et al. > I don't see liblog-log4perl-perl on Debian Backports. Later versions of Debian seem to have more up-to-date versions of Log4perl: http://packages.debian.org/sid/liblog-log4perl-perl -- -- Mike Mike Schilli m...@pe... > > Any suggestions? > > TIA, > > David > > > > 2013-11-04 23:08:03 dpchrist@p43200 ~/sandbox/perl > $ cat Log-Log4perl-logwarn.pl > #!/usr/bin/perl > use strict; > use warnings; > use Log::Log4perl qw(:easy); > warn "first warning"; > my $logger = Log::Log4perl->get_logger(); > $logger->logwarn("second warning"); > Log::Log4perl->easy_init($WARN); > warn "third warning"; > $logger->logwarn("fourth warning"); > > 2013-11-04 23:08:08 dpchrist@p43200 ~/sandbox/perl > $ perl Log-Log4perl-logwarn.pl > first warning at Log-Log4perl-logwarn.pl line 5. > third warning at Log-Log4perl-logwarn.pl line 9. > 2013/11/04 23:08:12 fourth warning > fourth warning at Log-Log4perl-logwarn.pl line 10 > > 2013-11-04 23:08:12 dpchrist@p43200 ~/sandbox/perl > $ cat Log-Log4perl-logdie.pl > #!/usr/bin/perl > use strict; > use warnings; > use Log::Log4perl qw(:easy); > my $logger = Log::Log4perl->get_logger(); > $logger->logdie("bye"); > > 2013-11-04 23:08:18 dpchrist@p43200 ~/sandbox/perl > $ perl Log-Log4perl-logdie.pl > bye at Log-Log4perl-logdie.pl line 6 > > 2013-11-04 23:08:23 dpchrist@p43200 ~/sandbox/perl > $ cat Log-Log4perl-logdie2.pl > #!/usr/bin/perl > use strict; > use warnings; > use Log::Log4perl qw(:easy); > Log::Log4perl->easy_init($WARN); > my $logger = Log::Log4perl->get_logger(); > $logger->logdie("bye"); > > 2013-11-04 23:08:31 dpchrist@p43200 ~/sandbox/perl > $ perl Log-Log4perl-logdie2.pl > 2013/11/04 23:08:34 bye > bye at Log-Log4perl-logdie2.pl line 7 > > 2013-11-04 23:08:34 dpchrist@p43200 ~/sandbox/perl > $ perl -MLog::Log4perl -e 'print $Log::Log4perl::VERSION, "\n"' > 1.29 > > 2013-11-04 23:08:45 dpchrist@p43200 ~/sandbox/perl > $ perl --version > > This is perl 5, version 14, subversion 2 (v5.14.2) built for > i486-linux-gnu-thread-multi-64int > (with 88 registered patches, see perl -V for more detail) > > Copyright 1987-2011, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source kit. > > Complete documentation for Perl, including FAQ lists, should be found on > this system using "man perl" or "perldoc perl". If you have access to the > Internet, point your browser at http://www.perl.org/, the Perl Home Page. > > > 2013-11-04 23:08:55 dpchrist@p43200 ~/sandbox/perl > $ cat /etc/debian_version > 7.2 > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: David C. <dpc...@ho...> - 2013-11-05 18:02:45
|
On 11/04/2013 11:18 PM, David Christensen wrote: > I was expecting logwarn() would always output the > warning message to the terminal, and additionally output the warning > message to the log destination if logging is enabled. I found a work-around -- write a wrapper that calls warn() and $logger->warn() instead. HTH, David 2013-11-05 10:01:04 dpchrist@p43200 ~/sandbox/perl $ cat Log-Log4perl-warn.pl #!/usr/bin/perl use strict; use warnings; use Log::Log4perl qw(:easy); sub mylogwarn { my $logger = Log::Log4perl->get_logger(); warn @_; $logger->warn(@_); } mylogwarn "first warning"; Log::Log4perl->easy_init($WARN); mylogwarn "second warning"; 2013-11-05 10:01:10 dpchrist@p43200 ~/sandbox/perl $ perl Log-Log4perl-warn.pl first warning at Log-Log4perl-warn.pl line 7. second warning at Log-Log4perl-warn.pl line 7. 2013/11/05 10:01:13 second warning |
From: David C. <dpc...@ho...> - 2013-11-05 07:18:37
|
log4perl-devel: I am working on a module that incorporates stealth logging. I've used logwarn() in place of warn() throughout. When I enable a logger in a script that use's the module, I see warning messages both on the terminal and in the log destination. But, when there is no logger enabled, I don't see any warning messages on the terminal. I was expecting logwarn() would always output the warning message to the terminal, and additionally output the warning message to the log destination if logging is enabled. Apparently, not. As an aside, logdie() appears to work as expected. I see that Log::Log4perl is now version 1.42 on CPAN. I'm on Debian Stable (Wheezy), which has version 1.29. I'd rather not upgrade via 'cpan', as I've found that circumventing Apt and the Debian release process leads to problems. I don't see liblog-log4perl-perl on Debian Backports. Any suggestions? TIA, David 2013-11-04 23:08:03 dpchrist@p43200 ~/sandbox/perl $ cat Log-Log4perl-logwarn.pl #!/usr/bin/perl use strict; use warnings; use Log::Log4perl qw(:easy); warn "first warning"; my $logger = Log::Log4perl->get_logger(); $logger->logwarn("second warning"); Log::Log4perl->easy_init($WARN); warn "third warning"; $logger->logwarn("fourth warning"); 2013-11-04 23:08:08 dpchrist@p43200 ~/sandbox/perl $ perl Log-Log4perl-logwarn.pl first warning at Log-Log4perl-logwarn.pl line 5. third warning at Log-Log4perl-logwarn.pl line 9. 2013/11/04 23:08:12 fourth warning fourth warning at Log-Log4perl-logwarn.pl line 10 2013-11-04 23:08:12 dpchrist@p43200 ~/sandbox/perl $ cat Log-Log4perl-logdie.pl #!/usr/bin/perl use strict; use warnings; use Log::Log4perl qw(:easy); my $logger = Log::Log4perl->get_logger(); $logger->logdie("bye"); 2013-11-04 23:08:18 dpchrist@p43200 ~/sandbox/perl $ perl Log-Log4perl-logdie.pl bye at Log-Log4perl-logdie.pl line 6 2013-11-04 23:08:23 dpchrist@p43200 ~/sandbox/perl $ cat Log-Log4perl-logdie2.pl #!/usr/bin/perl use strict; use warnings; use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($WARN); my $logger = Log::Log4perl->get_logger(); $logger->logdie("bye"); 2013-11-04 23:08:31 dpchrist@p43200 ~/sandbox/perl $ perl Log-Log4perl-logdie2.pl 2013/11/04 23:08:34 bye bye at Log-Log4perl-logdie2.pl line 7 2013-11-04 23:08:34 dpchrist@p43200 ~/sandbox/perl $ perl -MLog::Log4perl -e 'print $Log::Log4perl::VERSION, "\n"' 1.29 2013-11-04 23:08:45 dpchrist@p43200 ~/sandbox/perl $ perl --version This is perl 5, version 14, subversion 2 (v5.14.2) built for i486-linux-gnu-thread-multi-64int (with 88 registered patches, see perl -V for more detail) Copyright 1987-2011, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. 2013-11-04 23:08:55 dpchrist@p43200 ~/sandbox/perl $ cat /etc/debian_version 7.2 |
From: Chandin W. <cha...@no...> - 2013-08-15 20:40:12
|
Hi folks, I opened up https://rt.cpan.org/Public/Bug/Display.html?id=82923 back in January but that seems like the incorrect forum, so I'm trying here after finishing off the app I was working on. In a nutshell, what I'm trying to do is configure l4p such that any ERROR messages get accumulated up and emailed. Well, actually, what I really want is - When the first ERROR message is logged, send out an email immediately with the log message, and a 'header section' with additional details. - For all other ERROR messages, accumulate for one hour before sending email, again with header. - Upon process exit, email any accumulated messages. But really, I'll settle for - Accumulate all ERROR messages, sending out email at most once an hour. - Upon process exit, email any accumulated messages. It's that second part that was really failing when I chased this rabbit back in January, despite tinkering with most of the knobs I could find. Ideas? Bugs? The platforms are mostly perl-5.8, although that's changing to 5.10 gradually. l4p is 1.40, other module versions would be relatively fresh as well. thanks, --Chan Chandin Wilson, General Specialist, Information technology. cha...@no... +1-608-216-5689 OneNOAA RDHPCS Infrastructure via High Performance Technologies Group, a DRC company |
From: Mike S. <m...@pe...> - 2013-07-26 05:27:14
|
Log4perl enthusiasts, Log::Log4perl 1.42 has just been released. Here's what's been changed: 1.42 (2013/07/25) * (ms) BenRifkah Bergsten-Buret added ';!' for property configurator comment delimiters: https://github.com/mschilli/log4perl/issues/25 * (ms) [rt.cpan.org 84723] Suppress error if close() in the file appender in pipe mode returns "No child processes". * (ms) Ronald J Kimball fixed a bug with the file appender's create_at_logtime option in combination with recreate_check_signal: https://github.com/mschilli/log4perl/pull/28 * (ms) Fixed additivity() modifications after init(): https://github.com/mschilli/log4perl/issues/29 * (ms) [rt.cpan.org 87191] Applied patch by Zefram for better maintainable line number checks (and coping with 5.19 buggy line numbering, cough, cough). It'll hit CPAN momentarily. Enjoy! -- -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2013-06-07 03:05:31
|
On Wed, 5 Jun 2013, Arthur Rance wrote: > I'd like to create a $logger which is independant from the rootLogger. > It doesn't work : Hi Arthur, you've run into a "logger additivity" issue, check out this FAQ and if you use the "additivity" setting suggested there, I'm sure you'll get what you expect: http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#a6c81 -- -- Mike Mike Schilli m...@pe... > > #!/usr/bin/perl > > use strict; > use warnings; > > use Log::Log4perl; > > my $log_conf = q/ > log4perl.rootLogger = INFO, Screen1 > > log4perl.appender.Screen1 = Log::Log4perl::Appender::Screen > log4perl.appender.Screen1.layout = Log::Log4perl::Layout::SimpleLayout > > log4perl.logger.independantLogger = INFO, Screen2 > > log4perl.appender.Screen2 = Log::Log4perl::Appender::Screen > log4perl.appender.Screen2.layout = Log::Log4perl::Layout::SimpleLayout > /; > Log::Log4perl::init( \$log_conf ); > > my $logger = Log::Log4perl::get_logger(); > $logger->info("foo"); > > my $logger2 = Log::Log4perl::get_logger('independantLogger'); > $logger2->info("bar"); # It also logs with rootLogger... :( > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Arthur R. <art...@ho...> - 2013-06-05 15:03:41
|
Hello, I'd like to create a $logger which is independant from the rootLogger. It doesn't work : #!/usr/bin/perl use strict; use warnings; use Log::Log4perl; my $log_conf = q/ log4perl.rootLogger = INFO, Screen1 log4perl.appender.Screen1 = Log::Log4perl::Appender::Screen log4perl.appender.Screen1.layout = Log::Log4perl::Layout::SimpleLayout log4perl.logger.independantLogger = INFO, Screen2 log4perl.appender.Screen2 = Log::Log4perl::Appender::Screen log4perl.appender.Screen2.layout = Log::Log4perl::Layout::SimpleLayout /; Log::Log4perl::init( \$log_conf ); my $logger = Log::Log4perl::get_logger(); $logger->info("foo"); my $logger2 = Log::Log4perl::get_logger('independantLogger'); $logger2->info("bar"); # It also logs with rootLogger... :( |
From: Mike S. <m...@pe...> - 2013-05-30 05:41:41
|
On Thu, 16 May 2013, Mark Horstmeier wrote: > Log4perl loads with level set to ERROR per conf. I want to set my > appender to DEBUG Threshold was not defined in the conf so it is set > to ALL I set the appender to DEBUG But still only the ERROR and FATAL > levels are output Looks like you're setting the appender's threshold when what you really want is setting the logger's level instead. Doesn't my $logger = Log::Log4perl::get_logger(''); # ... $logger->level( $DEBUG ); do what you have in mind? -- -- Mike Mike Schilli m...@pe... > A follow up question on thresholds I have a web app (application > engine) that returns different mime-types depending on the query. I > use a screen appender to embed the debug logs in the response (usually > javascript, because I often return javascript for the client browser > to execute). > > When I need to return JSON, the javascript debug > // <log4perl stuff> > > Blows up the JSON encoding. > > If I just use $logger->level(..) to keep the debug from leaking into my JSON > document, I lose the debug information that is written to my file appender. > > When I return javascript, embedding the debug in the javascript is very > helpful to the people apps for my application engine so they can debug the > creation of the javascript so I don't want to eliminate it. > > I have tried to change the threshold dynamically on just one appender, but > the log out put remains the same (I am testing this with just a file > appender for simplicity): > my $logger = Log::Log4perl::get_logger(''); > DEBUG("debug"); > INFO("info"); > WARN("warn"); > ERROR("error"); > FATAL("fatal"); > ... > my $appender = $Log::Log4perl::Logger::APPENDER_BY_NAME{$key}; > my $dthresh = $appender->threshold(); > $logger->error("Appender set to: ",Log::Log4perl::Level::to_level( > $dthresh )); > my $nthresh = $appender->threshold($DEBUG); > ... > $logger->error("Appender set to: ",Log::Log4perl::Level::to_level( > $n2thresh )); > $logger->debug("debug"); > $logger->info("info"); > $logger->warn("warn"); > $logger->error("error"); > $logger->fatal("fatal"); > > With my conf file: > log4perl.logger = ERROR, FileApp > > log4perl.appender.FileApp = Log::Log4perl::Appender::File > log4perl.appender.FileApp.filename = /web/logs/detail_log > log4perl.appender.FileApp.mode = append > log4perl.appender.FileApp.owner = web > log4perl.appender.FileApp.group = web > log4perl.appender.FileApp.utf8 = 1 > log4perl.appender.FileApp.layout = > Log::Log4perl::Layout::PatternLayout > log4perl.appender.FileApp.layout.ConversionPattern = \ > %r %X{eid} %p %F{1} %X{site} %X{rule} %m%n > > Apache gives me this: > 3 [undef] ERROR Configure.pm [undef] [undef] error > 4 [undef] FATAL Configure.pm [undef] [undef] fatal > 5 [undef] ERROR Configure.pm [undef] [undef] Appender set to: > ALL > > > 5 [undef] ERROR Configure.pm [undef] [undef] DEBUG FileApp > > > 6 [undef] ERROR Configure.pm [undef] [undef] Appender set to: > DEBUG > 6 [undef] ERROR Configure.pm [undef] [undef] error > 6 [undef] FATAL Configure.pm [undef] [undef] fatal > > ... > > I suppose that an alternative would be to apply a Buffer composite appender > and only creating the trigger condition if the response type is not JSON > > Should I be able to make this work via threshold or do I need to pursue an > alternative solution? > > |
From: David C. <dpc...@ho...> - 2013-05-24 04:56:35
|
log4perl-devel: I'm attempting to learn Java using jdk1.7.0_17 on Debian 6.0.7 and have found the Oracle Discussion Forums to be less than helpful: https://forums.oracle.com/forums/category.jspa?categoryID=285 Since log4perl is based on a Java concept, can anybody recommend a friendly mailing list or forum for experienced programmers learning Java using command-line tools, not an IDE? TIA, David |
From: Mark H. <sol...@gm...> - 2013-05-16 19:03:53
|
A follow up question on thresholds I have a web app (application engine) that returns different mime-types depending on the query. I use a screen appender to embed the debug logs in the response (usually javascript, because I often return javascript for the client browser to execute). When I need to return JSON, the javascript debug > // <log4perl stuff> Blows up the JSON encoding. If I just use $logger->level(..) to keep the debug from leaking into my JSON document, I lose the debug information that is written to my file appender. When I return javascript, embedding the debug in the javascript is very helpful to the people apps for my application engine so they can debug the creation of the javascript so I don't want to eliminate it. I have tried to change the threshold dynamically on just one appender, but the log out put remains the same (I am testing this with just a file appender for simplicity): my $logger = Log::Log4perl::get_logger(''); DEBUG("debug"); INFO("info"); WARN("warn"); ERROR("error"); FATAL("fatal"); ... my $appender = $Log::Log4perl::Logger::APPENDER_BY_NAME{$key}; my $dthresh = $appender->threshold(); $logger->error("Appender set to: ",Log::Log4perl::Level::to_level( $dthresh )); my $nthresh = $appender->threshold($DEBUG); ... $logger->error("Appender set to: ",Log::Log4perl::Level::to_level( $n2thresh )); $logger->debug("debug"); $logger->info("info"); $logger->warn("warn"); $logger->error("error"); $logger->fatal("fatal"); With my conf file: log4perl.logger = ERROR, FileApp log4perl.appender.FileApp = Log::Log4perl::Appender::File log4perl.appender.FileApp.filename = /web/logs/detail_log log4perl.appender.FileApp.mode = append log4perl.appender.FileApp.owner = web log4perl.appender.FileApp.group = web log4perl.appender.FileApp.utf8 = 1 log4perl.appender.FileApp.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.FileApp.layout.ConversionPattern = \ %r %X{eid} %p %F{1} %X{site} %X{rule} %m%n Apache gives me this: 3 [undef] ERROR Configure.pm [undef] [undef] error > 4 [undef] FATAL Configure.pm [undef] [undef] fatal > 5 [undef] ERROR Configure.pm [undef] [undef] Appender set to: ALL > > 5 [undef] ERROR Configure.pm [undef] [undef] DEBUG FileApp > 6 [undef] ERROR Configure.pm [undef] [undef] Appender set to: DEBUG > 6 [undef] ERROR Configure.pm [undef] [undef] error > 6 [undef] FATAL Configure.pm [undef] [undef] fatal Log4perl loads with level set to ERROR per conf. I want to set my appender to DEBUG Threshold was not defined in the conf so it is set to ALL I set the appender to DEBUG But still only the ERROR and FATAL levels are output I suppose that an alternative would be to apply a Buffer composite appender and only creating the trigger condition if the response type is not JSON Should I be able to make this work via threshold or do I need to pursue an alternative solution? |
From: Alexander H. <ale...@gm...> - 2013-04-22 08:18:07
|
Thanks Mike, now I can retire my 1.40_01 version from our internal CPAN. On Mon, Apr 22, 2013 at 8:46 AM, Mike Schilli <m...@pe...> wrote: > Hi Log4perl enthusiasts, > > Log::Log4perl 1.41 was just released to CPAN. The following changes were > included: > > 1.41 (2013/04/21) > * (ms) [rt 81731] Added 'trace' level to Log4perl::Catalyst, as > suggested by Ashley Pond. > * (ms) Alexander Hartmaier added Log::Log4perl::Filter::MDC to > filter > based on MDC key/value > * (ms) [rt.cpan.org 83193] The file appender now ignores > owner/group > settings on all types of existing file system entries > (previously, > this was only the case for actual files). > * (ms) [rt.cpan.org 84289] Documented Level.pm's isGreaterOrEqual() > comparator. > * (ms) [rt.cpan.org #84725] Fixed test suite to allow running tests > in parallel via HARNESS_OPTIONS=j10:c HARNESS_TIMER=1. > Reported by Brendan Byrd. > > Enjoy! > > -- > -- Mike > > Mike Schilli > m...@pe... > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Mike S. <m...@pe...> - 2013-04-22 06:47:24
|
Hi Log4perl enthusiasts, Log::Log4perl 1.41 was just released to CPAN. The following changes were included: 1.41 (2013/04/21) * (ms) [rt 81731] Added 'trace' level to Log4perl::Catalyst, as suggested by Ashley Pond. * (ms) Alexander Hartmaier added Log::Log4perl::Filter::MDC to filter based on MDC key/value * (ms) [rt.cpan.org 83193] The file appender now ignores owner/group settings on all types of existing file system entries (previously, this was only the case for actual files). * (ms) [rt.cpan.org 84289] Documented Level.pm's isGreaterOrEqual() comparator. * (ms) [rt.cpan.org #84725] Fixed test suite to allow running tests in parallel via HARNESS_OPTIONS=j10:c HARNESS_TIMER=1. Reported by Brendan Byrd. Enjoy! -- -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2013-04-17 03:47:46
|
On Tue, 16 Apr 2013, Jens Berthold wrote: > using the programmatic approach to configure Log4perl I spent quite > some time to find a reference to Log::Log4perl::Appender->threshold(). > I would really like to see that function described in the pod for > Log::Log4perl::Appender. Right now, the Appender.pm POD doesn't have any information, it's all in Log4perl.pm, but we should restructure the docs at some point (help wanted! :). You're right, threshold() wasn't documented, I've added it to the main docs: https://github.com/mschilli/log4perl/commit/c4d5f2d32095142ca6064d0c9564504fbcd61e1c Thanks for the note! -- -- Mike Mike Schilli m...@pe... |
From: Jens B. <je...@je...> - 2013-04-16 20:27:15
|
Hi, using the programmatic approach to configure Log4perl I spent quite some time to find a reference to Log::Log4perl::Appender->threshold(). I would really like to see that function described in the pod for Log::Log4perl::Appender. Thanks! -- Jens |
From: Michiel B. <mic...@gm...> - 2013-04-12 11:06:42
|
Hi, On Windows, one Log4perl test fails using File::Temp 1.23. If I install File::Temp 1.22 the test passes. On my Debian box, Log4perl passes tests just fine. t/053Resurrect.t ..... Deep recursion on subroutine "Log::Log4perl::Resurrector::resurrector_fh" at C:\Perl\cpan\build\Log-Log4perl-1.40-ys74z4\blib\lib/Log/Log4perl/Resurrector.pm line 70. Deep recursion on subroutine "File::Temp::tempfile" at C:\Perl\cpan\build\Log-Log4perl-1.40-ys74z4\blib\lib/Log/Log4perl/Resurrector.pm line 28. t/053Resurrect.t ..... Dubious, test returned 253 (wstat 64768, 0xfd00) No subtests run File::Temp 1.23 will be included in upcoming perl 5.18. I'm not sure if this is a problem with File::Temp or of Log4perl actually does something it should not. Does anyone have advise? -- Mike |
From: Mike S. <m...@pe...> - 2013-04-12 06:38:17
|
On Thu, 11 Apr 2013, Jochen Hayek wrote: > Search for "category>"! > I assume it should simply read "category". > I assume "$logger-category()>" should get replaced with "$logger->category()". Fixed, thanks! https://github.com/mschilli/log4perl/commit/afc67be8b7c814f803279a973c510e82ed123b44 > I am sorry, I did not find them earlier, > so I could have sent them with my previous note. Your findings are greatly appreciated! By the way, if you want to make it even easier for me to apply fixes, you can send me a pull request [1]! That way, you can directly contribute to the project. But I'll happily apply more fixes manually if you have any! [1] https://help.github.com/articles/using-pull-requests -- -- Mike Mike Schilli m...@pe... |
From: Jochen H. <Joc...@Ha...> - 2013-04-11 13:31:31
|
Within the Log::Log4perl manual page I found a few more typos: Search for "category>"! I assume it should simply read "category". I assume "$logger-category()>" should get replaced with "$logger->category()". I am sorry, I did not find them earlier, so I could have sent them with my previous note. Kind regards, J. |