Log::ger::Like::LogAny - Log like Log::Any
version 0.006
To switch your code from Log::Any to Log::ger, replace this:
use Log::Any; use Log::Any '$log';
to:
use Log::ger::Like::LogAny; use Log::ger::Like::LogAny '$log';
The rest of this works in Log::Any as well as under Log::ger::Like::LogAny:
my $log = Log::Any->get_logger(category => 'My::Package'); $log->err("blah ...", "more blah ..."); $log->tracef("fmt %s %s", "blah ...", {data=>'structure'}); if ($log->is_trace) { ... }
To set output, use one of the available Log::ger::Output::*. You can send logs to Log::Any using Log::ger::Output::LogAny.
Log::ger::Output::*
This module mimics Log::Any-like logging interface. The idea is that you replace the use statement like shown in the Synopsis and you're done switching. Useful for code that uses Log::Any. Not everything is supported though (see the above Synopsis).
use
Log::ger
Log::Any
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020, 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Log::ger::Like::LogAny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::ger::Like::LogAny
CPAN shell
perl -MCPAN -e shell install Log::ger::Like::LogAny
For more information on module installation, please visit the detailed CPAN module installation guide.