NAME

Log::ger::Manual::ForLogContextual - Log::ger for Log::Contextual users

VERSION

version 0.015.002

WHY LOG::CONTEXTUAL

Log::Contextual provides block style, if that's what you like:

log_trace { "foo bar " . some_heavy_calculation() };

The block will not be executed if the log level is higher than trace, although log_trace() itself is still called.

Log::Contextual provides interface for Log::Log4perl, Log::Dispatch, Log::Dispatchouli, and some others. But this is not unique to Log::Contextual; other libraries like Log::Any or Log::ger can also use various backends.

WHY LOG::GER OVER LOG::CONTEXTUAL

Log::Contextual does not yet encourage separation of logging consumer and producer. You have to (or, the documentation encourages you to) set up the backend in the same place as the logging.

Log::ger is faster (see benchmark in Bencher::Scenarios::LogGer) and has a smaller startup overhead.

Log::ger also provides block style if you want (see Log::ger::Format::Block).

FAQ

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 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.