From: Enzer, M. B. S. <mat...@ba...> - 2006-02-02 19:59:16
|
I have a logger with two appenders; Screen and File. Initially both appenders have a threshold of DEBUG. I'd like to change the threshold of the Screen appender (just for this logger object) to WARN, at run time. Something like this: my $logger =3D Log::Log4perl->get_logger($category); $logger->warn("connecting to insecure server"); # logged by both Screen and File appenders . . . $logger->new_threshold('Screen',$WARN); $logger->info("Receiving data from $server_name"); # logged only by File appender $logger->warn("Disconnecting from $server_name"); # Logged by Screen and File appenders. Is that reasonable? Do-able? Matisse Enzer Alpha Strategies Group =20 Barclays Global Investors=09 Email mat...@ba...=20 =20 This message and any attachments are confidential, proprietary, and may = be privileged. If this message was misdirected, Barclays Global = Investors (BGI) does not waive any confidentiality or privilege. If you = are not the intended recipient, please notify us immediately and destroy = the message without disclosing its contents to anyone. Any = distribution, use or copying of this e-mail or the information it = contains by other than an intended recipient is unauthorized. The views = and opinions expressed in this e-mail message are the author's own and = may not reflect the views and opinions of BGI, unless the author is = authorized by BGI to express such views or opinions on its behalf. All = email sent to or from this address is subject to electronic storage and = review by BGI. Although BGI operates anti-virus programs, it does not = accept responsibility for any damage whatsoever caused by viruses being = passed. |