Log::Contextual::Easy::Package - Import all logging methods with WarnLogger as default package logger
version 0.008000
In your module:
package My::Module; use Log::Contextual::Easy::Package; log_debug { "your message" }; Dlog_trace { $_ } @vars;
In your program:
use My::Module; # enable warnings $ENV{MY_MODULE_UPTO}="TRACE"; # or use a specific logger with set_logger / with_logger
By default, this module enables a Log::Contextual::WarnLogger with env_prefix based on the module's name that uses Log::Contextual::Easy. The logging levels are set to trace debug, info, warn, error, and fatal (in this order) and all logging functions (log_..., logS_..., Dlog_..., and Dlog...) are exported.
env_prefix
trace
debug
info
warn
error
fatal
For what ::Package implies, see "-package_logger" in Log::Contextual.
::Package
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
This software is copyright (c) 2017 by Arthur Axel "fREW" Schmidt.
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::Contextual, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Contextual
CPAN shell
perl -MCPAN -e shell install Log::Contextual
For more information on module installation, please visit the detailed CPAN module installation guide.