in reply to To create a custom log
Note the ability to set a log level (DEBUG is, I think, the default, but Log4perl has great docs). One hint: if you will be using Data::Dumper in a call to DEBUG, for instance, wrap it in an anonymous sub; that way Log4perl can skip doing the Dumper call altogether if DEBUG logging is off.use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($ERROR); DEBUG "This doesn't go anywhere"; ERROR "This gets logged";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: To create a custom log
by sajanagr (Acolyte) on Aug 27, 2010 at 11:04 UTC |