1 package Log::Contextual::Easy::Default;
3 # ABSTRACT: Import all logging methods with WarnLogger as default
8 use base 'Log::Contextual';
10 sub arg_default_logger {
14 require Log::Contextual::WarnLogger;
15 my $package = uc(caller(3));
17 return Log::Contextual::WarnLogger->new({env_prefix => $package});
21 sub default_import { qw(:dlog :log ) }
32 use Log::Contextual::Easy::Default;
34 log_debug { "your message" };
35 Dlog_trace { $_ } @vars;
42 $ENV{MY_MODULE_UPTO}="TRACE";
44 # or use a specific logger with set_logger / with_logger
48 By default, this module enables a L<Log::Contextual::WarnLogger>
49 with C<env_prefix> based on the module's name that uses
50 Log::Contextual::Easy. The logging levels are set to C<trace> C<debug>,
51 C<info>, C<warn>, C<error>, and C<fatal> (in this order) and all
52 logging functions (L<log_...|Log::Contextual/"log_$level">,
53 L<logS_...|Log::Contextual/"logS_$level">,
54 L<Dlog_...|Log::Contextual/"Dlog_$level">, and
55 L<Dlog...|Log::Contextual/"DlogS_$level">) are exported.
57 For what C<::Default> implies, see L<Log::Contextual/-default_logger>.
63 =item L<Log::Contextual::Easy::Package>