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: Gangemi, J. <Jae...@bm...> - 2012-04-17 21:23:52
|
hello - i'm currently running log4perl inside an embedded instance, for all intents and purposes, you could say it's an environment similar to mod_perl. while the system is running, i would like to send a command that changes the log level of either the root logger or against one of the logger categories (and potentially dynamically adding an appender so i can log to a separate file. the problem i am having the log level does not persist between calls into the system. i can make a call in and change the log level (and log a message at the new level to make sure it worked) but on a subsequent call, the log level has been reset to what log4perl was originally initialized with, i.e.: $logger = Log::Log4perl->get_logger(""); $logger->fatal("fatal message"); $logger->trace("trace message, should not see"); $logger->level($TRACE); $logger->level("trace message, should see"); am i missing something w/ this idea or will i need to re-initialize log4perl w/ a new configuration in order to make this work? thanks! -- -jae |
From: Mike S. <m...@pe...> - 2012-03-07 02:27:51
|
On Fri, 24 Feb 2012, Gangemi, Jae wrote: > i figured out that i can do this w/ a custom filter on the root logger > appender. if the category matches Foo and it's log message level is < > INFO, it will be blocked, otherwise it would logged by the root logger. That's perfect! -- -- Mike Mike Schilli m...@pe... > > if you think there are any issues w/ that approach, please let me know. > > thanks! > > -- > -jae > > > > > On 2/23/12 11:22 PM, "Mike Schilli" <m...@pe...> wrote: > >> On Thu, 23 Feb 2012, Gangemi, Jae wrote: >> >>> if i add the following to the config: >>> log4perl.additivity.Foo = 1 >>> the messages are only output by the A2 appender, but that really isn't >>> the behavior i want. >> >> This happens if you set >> >> log4perl.additivity.Foo = 0 >> >> >>> instead, i would like to see is the A2 appender continue to log all >>> messages coming out of Foo but still have the A1 appender print out any >>> messages from Foo that are >= the current level of the root appender. so >>> in this case, the A1 appender would print INFO, WARN, etc messages that >>> Foo generates. >> >> Sounds like you want to set a threshold, check out this recipe: >> >> http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#How_can_I >> _send_errors_to_the_screen,_and_debug_messages_to_a_file? >> >> Let me know if that helps ... >> >> -- >> -- Mike >> >> Mike Schilli >> m...@pe... >> >>> suppose i have the following log configuration (yes, i realize appender >>> definitions are missing, but i don't think they are needed to ask this) >>> log4perl.rootLogger = INFO, A1 >>> log4perl.category.Foo = ERROR >>> >>> -- >>> >>> now i want to enable TRACE logging on category FOO and output on a >>> separate appender, so i would have this: >>> >>> -- >>> >>> log4perl.rootLogger = INFO, A1 >>> log4perl.category.Foo = TRACE, A2 >>> >>> -- >>> >>> >>> once i do this, i start seeing TRACE messages for Foo also being output >>> by appender A1, which is expected behavior b/c the A2 appender sends the >>> message off unconditionally. if i add the following to the config: >>> >>> -- >>> >>> log4perl.additivity.Foo = 1 >>> >>> -- >>> >>> the messages are only output by the A2 appender, but that really isn't >>> the behavior i want. >>> >>> instead, i would like to see is the A2 appender continue to log all >>> messages coming out of Foo but still have the A1 appender print out any >>> messages from Foo that are >= the current level of the root appender. so >>> in this case, the A1 appender would print INFO, WARN, etc messages that >>> Foo generates. >>> >>> is there a way to can tell the A2 appender to only forward the message >>> to the A1 appender if it's >= a certain level? >>> >>> thanks! >>> >>> -- >>> -jae >>> >>> >>> >>> >>> ------------------------------------------------------------------------- >>> ----- >>> Virtualization & Cloud Management Using Capacity Planning >>> Cloud computing makes use of virtualization - but cloud computing >>> also focuses on allowing computing to be delivered as a service. >>> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >>> _______________________________________________ >>> log4perl-devel mailing list >>> log...@li... >>> https://lists.sourceforge.net/lists/listinfo/log4perl-devel >>> > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Gangemi, J. <Jae...@bm...> - 2012-02-24 14:35:15
|
i looked at the threshold, but that doesn't solve my problem. i still want the root logging level to be set to DEBUG even when i've turned on the additional logging for Foo. i figured out that i can do this w/ a custom filter on the root logger appender. if the category matches Foo and it's log message level is < INFO, it will be blocked, otherwise it would logged by the root logger. if you think there are any issues w/ that approach, please let me know. thanks! -- -jae On 2/23/12 11:22 PM, "Mike Schilli" <m...@pe...> wrote: >On Thu, 23 Feb 2012, Gangemi, Jae wrote: > >> if i add the following to the config: >> log4perl.additivity.Foo = 1 >> the messages are only output by the A2 appender, but that really isn't >> the behavior i want. > >This happens if you set > > log4perl.additivity.Foo = 0 > > >> instead, i would like to see is the A2 appender continue to log all >> messages coming out of Foo but still have the A1 appender print out any >> messages from Foo that are >= the current level of the root appender. so >> in this case, the A1 appender would print INFO, WARN, etc messages that >> Foo generates. > >Sounds like you want to set a threshold, check out this recipe: > >http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#How_can_I >_send_errors_to_the_screen,_and_debug_messages_to_a_file? > >Let me know if that helps ... > >-- >-- Mike > >Mike Schilli >m...@pe... > >> suppose i have the following log configuration (yes, i realize appender >> definitions are missing, but i don't think they are needed to ask this) >> log4perl.rootLogger = INFO, A1 >> log4perl.category.Foo = ERROR >> >> -- >> >> now i want to enable TRACE logging on category FOO and output on a >> separate appender, so i would have this: >> >> -- >> >> log4perl.rootLogger = INFO, A1 >> log4perl.category.Foo = TRACE, A2 >> >> -- >> >> >> once i do this, i start seeing TRACE messages for Foo also being output >> by appender A1, which is expected behavior b/c the A2 appender sends the >> message off unconditionally. if i add the following to the config: >> >> -- >> >> log4perl.additivity.Foo = 1 >> >> -- >> >> the messages are only output by the A2 appender, but that really isn't >> the behavior i want. >> >> instead, i would like to see is the A2 appender continue to log all >> messages coming out of Foo but still have the A1 appender print out any >> messages from Foo that are >= the current level of the root appender. so >> in this case, the A1 appender would print INFO, WARN, etc messages that >> Foo generates. >> >> is there a way to can tell the A2 appender to only forward the message >> to the A1 appender if it's >= a certain level? >> >> thanks! >> >> -- >> -jae >> >> >> >> >>------------------------------------------------------------------------- >>----- >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> log4perl-devel mailing list >> log...@li... >> https://lists.sourceforge.net/lists/listinfo/log4perl-devel >> |
From: Mike S. <m...@pe...> - 2012-02-24 04:23:07
|
On Thu, 23 Feb 2012, Gangemi, Jae wrote: > if i add the following to the config: > log4perl.additivity.Foo = 1 > the messages are only output by the A2 appender, but that really isn't > the behavior i want. This happens if you set log4perl.additivity.Foo = 0 > instead, i would like to see is the A2 appender continue to log all > messages coming out of Foo but still have the A1 appender print out any > messages from Foo that are >= the current level of the root appender. so > in this case, the A1 appender would print INFO, WARN, etc messages that > Foo generates. Sounds like you want to set a threshold, check out this recipe: http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#How_can_I_send_errors_to_the_screen,_and_debug_messages_to_a_file? Let me know if that helps ... -- -- Mike Mike Schilli m...@pe... > suppose i have the following log configuration (yes, i realize appender > definitions are missing, but i don't think they are needed to ask this) > log4perl.rootLogger = INFO, A1 > log4perl.category.Foo = ERROR > > -- > > now i want to enable TRACE logging on category FOO and output on a > separate appender, so i would have this: > > -- > > log4perl.rootLogger = INFO, A1 > log4perl.category.Foo = TRACE, A2 > > -- > > > once i do this, i start seeing TRACE messages for Foo also being output > by appender A1, which is expected behavior b/c the A2 appender sends the > message off unconditionally. if i add the following to the config: > > -- > > log4perl.additivity.Foo = 1 > > -- > > the messages are only output by the A2 appender, but that really isn't > the behavior i want. > > instead, i would like to see is the A2 appender continue to log all > messages coming out of Foo but still have the A1 appender print out any > messages from Foo that are >= the current level of the root appender. so > in this case, the A1 appender would print INFO, WARN, etc messages that > Foo generates. > > is there a way to can tell the A2 appender to only forward the message > to the A1 appender if it's >= a certain level? > > thanks! > > -- > -jae > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Gangemi, J. <Jae...@bm...> - 2012-02-23 21:33:37
|
hello all - suppose i have the following log configuration (yes, i realize appender definitions are missing, but i don't think they are needed to ask this) -- log4perl.rootLogger = INFO, A1 log4perl.category.Foo = ERROR -- now i want to enable TRACE logging on category FOO and output on a separate appender, so i would have this: -- log4perl.rootLogger = INFO, A1 log4perl.category.Foo = TRACE, A2 -- once i do this, i start seeing TRACE messages for Foo also being output by appender A1, which is expected behavior b/c the A2 appender sends the message off unconditionally. if i add the following to the config: -- log4perl.additivity.Foo = 1 -- the messages are only output by the A2 appender, but that really isn't the behavior i want. instead, i would like to see is the A2 appender continue to log all messages coming out of Foo but still have the A1 appender print out any messages from Foo that are >= the current level of the root appender. so in this case, the A1 appender would print INFO, WARN, etc messages that Foo generates. is there a way to can tell the A2 appender to only forward the message to the A1 appender if it's >= a certain level? thanks! -- -jae |
From: Mike S. <m...@pe...> - 2012-02-22 07:44:38
|
Dear Log4perl enthusiasts, the 1.36 release just went to CPAN with the following fixes: 1.36 (2012/02/21) * (ms) [rt.cpan.org #74833] Reini Urban fixed "defined @array" for perl 5.16 * (ms) [rt.cpan.org #74836] Cope with Carp's questionable decision to add a trailing dot to its messages. Enjoy! -- -- Mike Mike Schilli m...@pe... |
From: Vangelis K. <ib...@ya...> - 2012-02-21 17:55:23
|
Hi In http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#I_keep_getting_duplicate_log_messages!_What%27s_wrong? there are two examples (line numbers come from FAQ.pm version 1.35): A) 2 categories both write in the same appender (lines 759-763) B) 2 categories each writes to separate appender (lines 817-825) The explanation in lines 789-793 for the example A is crystal clear. However, I don't understand how it applies to the example B. Perhaps the answer lies in "directly or indirectly attached appenders"? I am not sure I understand if one of the appenders in example B are indirect and why I need to set the 'Threshold' explicitly for the Screen1 appender (line 822) BTW if I follow the solution with 'Threshold' it works fine, I am just trying to understand why :) Regards Vangelis Katsikaros |
From: Mike S. <m...@pe...> - 2012-01-15 08:58:13
|
On Wed, 11 Jan 2012, Mark Horstmeier wrote: > in my apache conf file, but I am still getting the warnings from > Log4perl::Appender sent to my Apache error log. If you're talking about Log4perl warnings, I suppose that's a Screen appender, and you've configured Log4perl to log messages of level WARN. This is unrelated to Perl's warnings, it's a Log4perl configuration issue -- lower the level in the config file and the warnings will be suppressed. If you post your Log4perl configuration, I can help you with that. > I can eliminate the error by commenting the use warnings out of the > Appender.pm file, but I am loathe to push a modified module to our > production > Is there a config that I can use to turn warnings off? There is a fix for > the Wide character in print warning, but that is more about enabling UTF8 > than disabling warnings. Oh, I see, you're talking about Log4perl's Screen appender issuing a Perl warning about wide characters? That's caused by log functions writing messages including utf8 characters and if the appender isn't configured to log in utf8, Perl issues a warning. To fix this, use log4perl.appender.ScreenAppenderName.utf8 = 1 -- -- Mike Mike Schilli m...@pe... |
From: Mark H. <sol...@gm...> - 2012-01-11 23:30:07
|
There was an earlier email about the uninitialized value warning: Use of uninitialized value in join or string at /usr/lib/perl5/site_perl/5.8.8/Log/Log4perl/Appender.pm line 187, <DICT> line 479623. I am using mod-perl with apache and Log4perl version 1.31 I have tried to turn warnings off for my production environment via PerlWarn Off in my apache conf file, but I am still getting the warnings from Log4perl::Appender sent to my Apache error log. Appender.pm uses "use warnings" and I suspect that it is over-riding my global PerlWarn I can eliminate the error by commenting the use warnings out of the Appender.pm file, but I am loathe to push a modified module to our production Is there a config that I can use to turn warnings off? There is a fix for the Wide character in print warning, but that is more about enabling UTF8 than disabling warnings. It wouldn't be too bad, but I can't tell which log message is causing the error. |
From: Mike S. <m...@pe...> - 2012-01-03 17:40:05
|
Hi Log4perl enthusiasts, the Log::Log4perl 1.35 maintenance release just went up to CPAN with the following changes: 1.35 (2012/01/03) (ms) [rt.cpan.org #73462] Changed logwarn/logcluck/logcarp/error_warn to warn() unconditionally and send the message to log4perl which will log it only if the log level conditions are met. (ms) [rt.cpan.org #73598] Gerda Shank reported test suite problems with DBD::CSV-0.26. Bumped up to DBD::CSV-0.33 if installed. Enjoy! -- -- Mike Mike Schilli m...@pe... |
From: Martin J. E. <mar...@ea...> - 2012-01-03 10:17:31
|
On 24/12/11 01:01, Mike Schilli wrote: > On Mon, 21 Nov 2011, Martin J. Evans wrote: > >> Would you consider changing this? If not, I would be most grateful if >> you could you point me at the place where I could change this >> behaviour or tell my how I could override it. > > Alright, I gave in and fixed it :) Excellent and thank you. > https://github.com/mschilli/log4perl/commit/7d7fbbb45254d6c903f5b3cb91d7 > > Thanks for bringing this to my attention. Please give it a whirl! I have /whirled/ it and it a) now warns when it didn't before and b) seems to still work in all other ways we are using it. Thanks again. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com > >> >> Martin >> >>>> Hi, >>>> >>>> Is this really the intended behaviour: >>>> >>>> perl -w -le 'use strict;use warnings;use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove"); $lh->debug("fred");$lh->logwarn("warning from l:l"); warn("warning");' >>>> >>>> Log4perl: Seems like no initialization happened. Forgot to call init()? >>>> warning at -e line 1. >>>> >>>> i.e., if something does not call init for Log::Log4perl but has a log handle when logwarn is called a warn does not happen? >>>> >>> >>>> >>>> I spent some time debugging a problem this morning only to discover this. I find this most worrying as I'd expect the warn to happen whatever. If you substitute logdie for die it seems to work. >>>> >>>> perl -MLog::Log4perl -le 'print $Log::Log4perl::VERSION;' >>>> 1.33 >>>> This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi >>>> >>>> Martin >>>> >> >> >> > |
From: Mike S. <m...@pe...> - 2011-12-24 01:01:59
|
On Mon, 21 Nov 2011, Martin J. Evans wrote: > Would you consider changing this? If not, I would be most grateful if > you could you point me at the place where I could change this > behaviour or tell my how I could override it. Alright, I gave in and fixed it :) https://github.com/mschilli/log4perl/commit/7d7fbbb45254d6c903f5b3cb91d7 Thanks for bringing this to my attention. Please give it a whirl! -- -- Mike > > Martin > >>> Hi, >>> >>> Is this really the intended behaviour: >>> >>> perl -w -le 'use strict;use warnings;use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove"); $lh->debug("fred");$lh->logwarn("warning from l:l"); warn("warning");' >>> >>> Log4perl: Seems like no initialization happened. Forgot to call init()? >>> warning at -e line 1. >>> >>> i.e., if something does not call init for Log::Log4perl but has a log handle when logwarn is called a warn does not happen? >>> >> >>> >>> I spent some time debugging a problem this morning only to discover this. I find this most worrying as I'd expect the warn to happen whatever. If you substitute logdie for die it seems to work. >>> >>> perl -MLog::Log4perl -le 'print $Log::Log4perl::VERSION;' >>> 1.33 >>> This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi >>> >>> Martin >>> > > > -- -- Mike Mike Schilli m...@pe... |
From: Danny D. <dan...@ya...> - 2011-12-07 22:07:39
|
Ahh may have found it, it looks like http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#92664 using appender_by_name lets me call flush on it cheers ----- Original Message ----- From: Danny Dev <dan...@ya...> To: Mike Schilli <m...@pe...> Cc: "log...@li..." <log...@li...> Sent: Wednesday, December 7, 2011 9:19 AM Subject: Re: [log4perl-devel] log4perl buffering with semi persistent scripts >You didn't mention the email appender that you are using, specific >solutions would require looking into the appender's documentation and >figure out if it provides a method to flush buffered/pending messages. >If that's available, then I'd recommend encapsulating request handling >into a function scope and run a flush() at the end. thanks for the reply, I'm using Log::Dispatch::Email::MailSend which doesn't implement its own flush method. I took at look at all of the available Email appenders and none of them do, it's only in the base class but actually the base class method appears to do the job. I'm not clear on how I call that directly however since I can't call it against the object returned by get_logger and I have to pass it the correct object if I call it directly Log::Dispatch::Email::flush(???) cheers |
From: Danny D. <dan...@ya...> - 2011-12-07 17:19:24
|
>You didn't mention the email appender that you are using, specific >solutions would require looking into the appender's documentation and >figure out if it provides a method to flush buffered/pending messages. >If that's available, then I'd recommend encapsulating request handling >into a function scope and run a flush() at the end. thanks for the reply, I'm using Log::Dispatch::Email::MailSend which doesn't implement its own flush method. I took at look at all of the available Email appenders and none of them do, it's only in the base class but actually the base class method appears to do the job. I'm not clear on how I call that directly however since I can't call it against the object returned by get_logger and I have to pass it the correct object if I call it directly Log::Dispatch::Email::flush(???) cheers |
From: Mike S. <m...@pe...> - 2011-12-07 06:57:03
|
On Tue, 6 Dec 2011, Danny Dev wrote: > I think perhaps what I need is to enable buffering at the start of each > request, and disable it at the end of the request, is there some way to do > this or does someone have another solution? You didn't mention the email appender that you are using, specific solutions would require looking into the appender's documentation and figure out if it provides a method to flush buffered/pending messages. If that's available, then I'd recommend encapsulating request handling into a function scope and run a flush() at the end. Hope that makes sense! -- -- Mike Mike Schilli m...@pe... > I'm using log4perl in FCGI scripts that are semi-persistent, they go up and > down depending on load. > > I have an appender that sends email and I'd like it to be buffered. However > if I set it to buffered the emails are never sent, except sometimes when the > process is killed. If I disable buffering it works fine but the messages > are split up into too many individual emails. > >You're > > I took a look at some of the information for mod_perl but it doesn't quite > seem to pertain, and in my case the FCGIs are only persistent for a number > of requests then eventually exit. > > cheers for any advice > Danny > > |
From: Danny D. <dan...@ya...> - 2011-12-06 16:18:50
|
I'm using log4perl in FCGI scripts that are semi-persistent, they go up and down depending on load. I have an appender that sends email and I'd like it to be buffered. However if I set it to buffered the emails are never sent, except sometimes when the process is killed. If I disable buffering it works fine but the messages are split up into too many individual emails. I think perhaps what I need is to enable buffering at the start of each request, and disable it at the end of the request, is there some way to do this or does someone have another solution? I took a look at some of the information for mod_perl but it doesn't quite seem to pertain, and in my case the FCGIs are only persistent for a number of requests then eventually exit. cheers for any advice Danny |
From: Martin J. E. <mar...@ea...> - 2011-11-21 09:23:40
|
On 21/11/11 04:46, Mike Schilli wrote: > On Tue, 1 Nov 2011, Martin J. Evans wrote: > >> So substituting warn with logwarn does not always warn! > > That's an interesting case. The way it's implemented right now is that > logwarn() will only call warn() (along with other log4perl actions) if > the log level is greater or equal than WARN. > > logdie(), on the other hand, will call die() unconditionally, because > it's an action, not only a message. > > -- -- Mike So simply substituting warn with logwarn can change the way your program works. It is not for me to tell you how Log::Log4perl should work but I find this behaviour unacceptable as my program will behave differently depending on the log level. Logging should be logging, not changing the way my program runs. Example: $ perl -le '$SIG{__WARN__} = sub {CORE::die "Warning:\n", @_, "\n"}; use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove");warn("fred"); print "ok";' Warning: fred at -e line 1. Change the warn to logwarn: $ perl -le '$SIG{__WARN__} = sub {CORE::die "Warning:\n", @_, "\n"}; use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove");$lh->logwarn("fred"); print "ok"; ok Would you consider changing this? If not, I would be most grateful if you could you point me at the place where I could change this behaviour or tell my how I could override it. Martin >> Hi, >> >> Is this really the intended behaviour: >> >> perl -w -le 'use strict;use warnings;use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove"); $lh->debug("fred");$lh->logwarn("warning from l:l"); warn("warning");' >> >> Log4perl: Seems like no initialization happened. Forgot to call init()? >> warning at -e line 1. >> >> i.e., if something does not call init for Log::Log4perl but has a log handle when logwarn is called a warn does not happen? >> > >> >> I spent some time debugging a problem this morning only to discover this. I find this most worrying as I'd expect the warn to happen whatever. If you substitute logdie for die it seems to work. >> >> perl -MLog::Log4perl -le 'print $Log::Log4perl::VERSION;' >> 1.33 >> This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi >> >> Martin >> -- Martin J. Evans Easysoft Limited http://www.easysoft.com |
From: Mike S. <m...@pe...> - 2011-11-21 04:46:36
|
On Tue, 1 Nov 2011, Martin J. Evans wrote: > So substituting warn with logwarn does not always warn! That's an interesting case. The way it's implemented right now is that logwarn() will only call warn() (along with other log4perl actions) if the log level is greater or equal than WARN. logdie(), on the other hand, will call die() unconditionally, because it's an action, not only a message. -- -- Mike Mike Schilli m...@pe... > Hi, > > Is this really the intended behaviour: > > perl -w -le 'use strict;use warnings;use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove"); $lh->debug("fred");$lh->logwarn("warning from l:l"); warn("warning");' > > Log4perl: Seems like no initialization happened. Forgot to call init()? > warning at -e line 1. > > i.e., if something does not call init for Log::Log4perl but has a log handle when logwarn is called a warn does not happen? > > > I spent some time debugging a problem this morning only to discover this. I find this most worrying as I'd expect the warn to happen whatever. If you substitute logdie for die it seems to work. > > perl -MLog::Log4perl -le 'print $Log::Log4perl::VERSION;' > 1.33 > This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi > > Martin > |
From: Mike S. <m...@pe...> - 2011-11-05 05:49:23
|
Hi Log4perl enthusiasts, a minor Log::Log4perl 1.34 maintenance release has just made it to CPAN, including the following features: 1.34 (2011/11/04) (ms) InternalDebug now replaces all instances of INTERNAL_DEBUG, not just the first one. (ms) Added test case for get_logger() with a ref() on the actual object instead of on a static category. Updated docs. (ms) %d{e} in PatternLayout now returns epoch seconds (ms) [RT 72056] Messages blocked by an appender threshold are no longer passed on to the L4p::Appender::Buffer as undefined entries. Enjoy! -- -- Mike Mike Schilli m...@pe... |
From: Martin J. E. <mar...@ea...> - 2011-11-01 14:13:35
|
Hi, Is this really the intended behaviour: perl -w -le 'use strict;use warnings;use Log::Log4perl qw(get_logger); my $lh = get_logger("BET::Data::Remove"); $lh->debug("fred");$lh->logwarn("warning from l:l"); warn("warning");' Log4perl: Seems like no initialization happened. Forgot to call init()? warning at -e line 1. i.e., if something does not call init for Log::Log4perl but has a log handle when logwarn is called a warn does not happen? So substituting warn with logwarn does not always warn! I spent some time debugging a problem this morning only to discover this. I find this most worrying as I'd expect the warn to happen whatever. If you substitute logdie for die it seems to work. perl -MLog::Log4perl -le 'print $Log::Log4perl::VERSION;' 1.33 This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com |
From: Mike S. <m...@pe...> - 2011-10-26 15:49:05
|
On Tue, 25 Oct 2011, Mike Schilli wrote: > the delay on this ... this snippet doesn't compile for me > because $cfg isn't defined Gah, I had a missing module, never mind. The wrapper registration seems to work, though, here's the output of the script below: 2011/10/26 08:44:32 l4pm 54> Whoa! which prints the correct file and line number. Log4perl configuration is log4perl.category = WARN, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.filename = test.log log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen.layout.ConversionPattern = %d %F{1} %L> %m %n Let me know if you're doing something different. -- -- Mike Mike Schilli m...@pe... #!/usr/local/bin/perl -w use strict; ##--------------------------------------------------------------------------- { package Wrapper::Log::Log4perl; use local::lib; use Moose; use MooseX::Method::Signatures; use Log::Log4perl; Log::Log4perl->wrapper_register( __PACKAGE__ ); ## Attribute definitions has 'logger' => ( is => 'rw', isa => 'Log::Log4perl::Logger', ); has 'logger_cfg' => ( is => 'ro', isa => 'Maybe[Str]', ); ## Object initialization sub BUILD { my $self = shift(); unless ( Log::Log4perl->initialized() ) { $self->init( $self->logger_cfg() ); } $self->logger( Log::Log4perl->get_logger() ); } ## Method definitions method init ( Str $cfg ) { Log::Log4perl->init( $cfg ); }; __PACKAGE__->meta->make_immutable(); } ##--------------------------------------------------------------------------- { package main; use Data::Dumper; my $logApi = Wrapper::Log::Log4perl->new( logger_cfg => 'test.l4p' ); $logApi->logger->warn("Whoa!"); } >> I've recently encountered an odd issue while using Moose to create >> a wrapper class for Log::Log4perl that results in the logger's >> category somehow being returned as 'Eval.Closure', despite that I've >> registered the wrapper class as indicated in the documentation. |
From: Mike S. <m...@pe...> - 2011-10-26 06:44:57
|
On Wed, 12 Oct 2011, J Mash wrote: > I've recently encountered an odd issue while using Moose to create > a wrapper class for Log::Log4perl that results in the logger's > category somehow being returned as 'Eval.Closure', despite that I've > registered the wrapper class as indicated in the documentation. Sorry for the delay on this ... this snippet doesn't compile for me because $cfg isn't defined ... can you please check if you're missing a piece (please enable use strict/use warnings). -- -- Mike Mike Schilli m...@pe... > I'm not sure if this is an actual issue or just something I'm missing >with regards to wrapping Log::Log4perl, but here's a simplified code >example that exhibits the issue: > > ##--------------------------------------------------------------------------- > ------------------------------------------ > { > package Wrapper::Log::Log4perl; > > use Moose; > use MooseX::Method::Signatures; > > use Log::Log4perl; > Log::Log4perl->wrapper_register( __PACKAGE__ ); > > ## Attribute definitions > has 'logger' => ( > is => 'rw', > isa => 'Log::Log4perl::Logger', > ); > > has 'logger_cfg' => ( > is => 'ro', > isa => 'Maybe[Str]', > ); > > ## Object initialization > sub BUILD { > my $self = shift(); > > unless ( Log::Log4perl->initialized() ) { > $self->init( $self->logger_cfg() ); > } > $self->logger( Log::Log4perl->get_logger() ); > } > > ## Method definitions > method init ( Str $cfg ) { > Log::Log4perl->init( $cfg ); > }; > > __PACKAGE__->meta->make_immutable(); > } > > > ##--------------------------------------------------------------------------- > ------------------------------------------ > { > package main; > > use Data::Dumper; > > my $logApi = Wrapper::Log::Log4perl->new( logger_cfg => > '../Data/INI/Log/Log4perl.ini' ); > > print( Dumper($Log::Log4perl::Logger::LOGGERS_BY_NAME) ); > } > > Thanks in advance for taking a peek, and let me know if there's any more > information I can provide. > --J > > |
From: Mike S. <m...@pe...> - 2011-10-26 06:30:23
|
On Sun, 16 Oct 2011, Carlos Sepulveda Z. wrote: > use Log::Log4perl qw(:easy); > Log::Log4perl->easy_init($ERROR); > my $a; > ERROR($a); > > $ perl t.pl > Use of uninitialized value in join or string at > Log/Log4perl/Appender.pm line 167. Sorry for the delay on this, I'm working through a backlog of email. I'd say that the warning you're seeing is expected. It's consistent with what you'd see with print(), if you try out use warnings; my $a; print "$a\n"; you'll get the same message. And you've enabled warnings, right? :) -- -- Mike Mike Schilli m...@pe... > 2011/10/16 20:49:01 > > Line 167 of Appender say: > > 165 $p->{message} = > 166 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR, > 167 @{$p->{message}} > 168 ) if ref $p->{message} eq "ARRAY"; > > > and I think this could be fixed modifying like this : > > 165 $p->{message} = > 166 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR, > 167 map { defined $_ ? $_ : 'undef' } > @{$p->{message}} > 168 ) if ref $p->{message} eq "ARRAY"; > > > > > > > |
From: Carlos S. Z. <ca...@gm...> - 2011-10-16 23:52:21
|
Hi, I'm starting using Log4perl, and get warning about uninitialized value in Appender code. I think this change my program output when activate Log4perl, here is a example: *$ cat t.pl* use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($ERROR); my $a; ERROR($a); *$ perl t.pl* Use of uninitialized value in join or string at Log/Log4perl/Appender.pm line 167. 2011/10/16 20:49:01 Line 167 of Appender say: 165 $p->{message} = 166 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR, 167 @{$p->{message}} 168 ) if ref $p->{message} eq "ARRAY"; and I think this could be fixed modifying like this : 165 $p->{message} = 166 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR, 167 map { defined $_ ? $_ : 'undef' } @{$p->{message}} 168 ) if ref $p->{message} eq "ARRAY"; |
From: J M. <jm...@gm...> - 2011-10-12 17:05:25
|
Greetings, I've recently encountered an odd issue while using Moose to create a wrapper class for Log::Log4perl that results in the logger's category somehow being returned as 'Eval.Closure', despite that I've registered the wrapper class as indicated in the documentation. I'm not sure if this is an actual issue or just something I'm missing with regards to wrapping Log::Log4perl, but here's a simplified code example that exhibits the issue: *## --------------------------------------------------------------------------------------------------------------------- { package Wrapper::Log::Log4perl; use Moose; use MooseX::Method::Signatures; use Log::Log4perl; Log::Log4perl->wrapper_register( __PACKAGE__ ); ## Attribute definitions has 'logger' => ( is => 'rw', isa => 'Log::Log4perl::Logger', ); has 'logger_cfg' => ( is => 'ro', isa => 'Maybe[Str]', ); ## Object initialization sub BUILD { my $self = shift(); unless ( Log::Log4perl->initialized() ) { $self->init( $self->logger_cfg() ); } $self->logger( Log::Log4perl->get_logger() ); } ## Method definitions method init ( Str $cfg ) { Log::Log4perl->init( $cfg ); }; __PACKAGE__->meta->make_immutable(); } ## --------------------------------------------------------------------------------------------------------------------- { package main; use Data::Dumper; my $logApi = Wrapper::Log::Log4perl->new( logger_cfg => '../Data/INI/Log/Log4perl.ini' ); print( Dumper($Log::Log4perl::Logger::LOGGERS_BY_NAME) ); } * Thanks in advance for taking a peek, and let me know if there's any more information I can provide. --J |