Subject: | filter support |
Date: | Tue, 9 Jul 2013 00:21:44 -0500 |
To: | bugs-log-any [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
It'd be nice if Log::Any could allow for some kind of filter/callback
support where I could do something like
# pseodo perl
Log::Any->set_filter(sub {
my ( $msg, $obj) = @_;
return sprintf('%s %s %s', date, $msg, json( $obj ) );
});
this way you wouldn't have to put this kind of logic where Log::Any is
called. It would be called before passing it to the final logger.
Bonus points if it could get attached to either a specific log
engine/category, etc.
--
Caleb Cushing
http://xenoterracide.com
Calendar:
https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago