package Log::Contextual::Easy::Package; use strict; use warnings; our $VERSION = '0.009000'; use Log::Contextual (); BEGIN { our @ISA = qw(Log::Contextual); } sub arg_package_logger { if ($_[1]) { return $_[1]; } else { require Log::Contextual::WarnLogger; my $package = uc $_[2]; $package =~ s/::/_/g; return Log::Contextual::WarnLogger->new({env_prefix => $package}); } } sub default_import { qw(:dlog :log ) } 1; __END__ =pod =encoding UTF-8 =for :stopwords Arthur Axel "fREW" Schmidt =head1 NAME Log::Contextual::Easy::Package - Import all logging methods with WarnLogger as default package logger =head1 VERSION version 0.009000 =head1 SYNOPSIS 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 =head1 DESCRIPTION By default, this module enables a L with C based on the module's name that uses Log::Contextual::Easy. The logging levels are set to C C, C, C, C, and C (in this order) and all logging functions (L, L<< C|Log::Contextual/"logS_$level" >>, L<< C|Log::Contextual/"Dlog_$level" >>, and L<< C|Log::Contextual/"DlogS_$level" >>) are exported. For what C<::Package> implies, see L. =head1 SEE ALSO =over 4 =item L =back =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR Arthur Axel "fREW" Schmidt =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2024 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. =cut