Log::ger::OptAway - Optimize away higher-level log statements
version 0.001
use Log::ger::OptAway;
% perl -MLog::ger -MO=Deparse -e'log_warn "foo\n"; log_debug "bar\n"' log_warn("foo\n"); log_debug("bar\n"); -e syntax OK % perl -MLog::ger::OptAway -MLog::ger -MO=Deparse -e'log_warn "foo\n"; log_debug "bar\n"' log_warn("foo\n"); '???'; -e syntax OK
This module installs an Install_Routine hook that replaces logging call that are higher than the current level ($Log::ger::Current_Level) into a null statement. By default, since Current_Level is pre-set at 3 (warn) then log_info(), log_debug(), and log_trace() calls will be turned
$Log::ger::Current_Level
log_info()
log_debug()
log_trace()
Note: use Log::ger::OptAway must be performed before use Log::ger.
use Log::ger::OptAway
use Log::ger
perlancar <perlancar@cpan.org>
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.
To install Log::ger::OptAway, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::ger::OptAway
CPAN shell
perl -MCPAN -e shell install Log::ger::OptAway
For more information on module installation, please visit the detailed CPAN module installation guide.