Log::ger::Level::FromEnv - Set default log level from some environment variables
version 0.004
use Log::ger; use Log::ger::Level::FromEnv; log_warn "blah ...";
This module sets $Log::ger::Current_Level based on hints from several environment variables: LOG_LEVEL (for example, if set to warn or warning will set the log level to warning (30)), TRACE (if true, will set log level to trace (60)), DEBUG (if true, will set log level to debug (50)), VERBOSE (if true, will set log level to info (40)), QUIET (if true, will set log level to error (20)).
$Log::ger::Current_Level
LOG_LEVEL
warn
warning
TRACE
DEBUG
VERBOSE
QUIET
This is convenient for CLI programs or one-liners.
Log::ger::App
Log::ger::Screen
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020, 2018, 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::Level::FromEnv, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::ger::Level::FromEnv
CPAN shell
perl -MCPAN -e shell install Log::ger::Level::FromEnv
For more information on module installation, please visit the detailed CPAN module installation guide.