The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Log::ger::LevelFromEnv - Set default log level from some environment variables

VERSION

version 0.001

SYNOPSIS

 use Log::ger;
 use Log::ger::LevelFromEnv;

 log_warn "blah ...";

DESCRIPTION

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 (3)), TRACE (if true, will set log level to trace (6)), DEBUG (if true, will set log level to debug (5)), VERBOSE (if true, will set log level to info (4)), QUIET (if true, will set log level to error (2)).

This is convenient for CLI programs.

SEE ALSO

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.