![]() |
![]()
| ![]() |
![]()
NAMELog::Agent::Driver::Default - default logging driver for Log::Agent SYNOPSIS# Implicit use use Log::Agent; logconfig(-prefix => "prefix"); # optional # Explicit use use Log::Agent; require Log::Agent::Driver::Default; my $driver = Log::Agent::Driver::Default->make("prefix"); logconfig(-driver => $driver); DESCRIPTIONThe default logging driver remaps the logxxx() operations to their default Perl counterpart. For instance, logerr() will issue a warn() and logwarn() will call warn() with a clear "WARNING: " emphasis (to distinguish between the two calls). The only routine of interest here is the creation routine:
CHANNELSThe "error", "output" and "debug" channels all go to STDERR. BUGSIf logdie() is used within an eval(), the string you will get in $@ will be prefixed. It's not really a bug, simply that wrapping a code into eval() and parsing $@ is poor's man exception handling which shows its limit here: since the programmer using logdie() cannot foresee which driver will be used, the returned string cannot be determined precisely. Morality: use die() if you mean it, and document the string as an exception. AUTHORRaphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSOLog::Agent::Driver(3), Log::Agent(3).
|