Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 38941
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: Allen.Conway [...] atosorigin.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Log::Log4perl
Date: Wed, 3 Sep 2008 12:34:08 +0200
To: "bug-Log-Log4perl [...] rt.cpan.org" <bug-Log-Log4perl [...] rt.cpan.org>
From: Conway Allen <Allen.Conway [...] atosorigin.com>
perl 5.10.0 Log::Log4perl 1.17 Not sure if this is a bug - perhaps just a misunderstanding on my part. Want to be able to change an appender's threshold value dynamically. Used Log::Log4perl::Logger::APPENDER_BY_NAME() to change the value but that doesn't appear to have any effect. 1. Configure an appender called Screen with a threshold of DEBUG sending output to the screen. 2. $apex = $Log::Log4perl::Logger::APPENDER_BY_NAME('Screen'); $apex->{appender}{Threshold} = 'ERROR'; This doesn't have any effect, i.e. $logger->info("blabla") produces a log message. The documentation says: If you want access to the wrapper class (e.g. if you want to modify the appender's threshold), use the hash $Log::Log4perl::Logger::APPENDER_BY_NAME{...} instead, which holds references all appender wrapper objects. I am a little confused... Could there not be a routine to call that does this simply: change_level(AppenderName, NewLevel) ? Thanks, and best regards, Allen Conway Show quoted text
________________________________ Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Sorry for the late response, this one just fell through the cracks somehow. Ok, if you really want to dynamically set the appender's threshold (which is a rare thing to do, but there are valid use cases), you can use my $app = $Log::Log4perl::Logger::APPENDER_BY_NAME{Screen}; $app->threshold($DEBUG); to take care of it. Hope that helps! -- Mike