preaction / Log-Any

Simple, fast Perl logging API compatible with any logging system
Other
13 stars 19 forks source link

return log message from logging method #43

Closed preaction closed 8 years ago

preaction commented 8 years ago

This allows us to use the filtered, prefixed, and formatted log message as the input to a Perl die() (to raise an exception) or warn() (to help ensure that the output makes it to STDERR).

Fixes #18

preaction commented 8 years ago

One question so far: Should the returned message add a \n to avoid die/warn showing the file/line? My gut says no, but Log::Any's docs do explicitly mention never put a \n in the log message itself. Making people do die $log->fatal( "foo" ) . "\n" doesn't seem excessively onerous though.

preaction commented 8 years ago

This was merged and is in 1.041-TRIAL