Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files


  • Loading branch information...
commit 56e4cce366bc0fd1eac9f3fc8772c2d399a94050 1 parent 2f14295
Steven Haryanto (on PC) authored
Showing with 18 additions and 3 deletions.
  1. +18 −3 lib/Log/Any/
21 lib/Log/Any/
@@ -193,9 +193,8 @@ Change the program name. Default is taken from $0.
=item -level => 'trace'|'debug'|'info'|'warn'|'error'|'fatal'|'off'
-Specify log level for all outputs, e.g. C<warn>, C<debug>, etc. Each
-output can override this value. The default log level is determined as
+Specify log level for all outputs. Each output can override this value. The
+default log level is determined as follow:
If L<App::Options> is present, these keys are checked in
B<%App::options>: B<log_level>, B<trace> (if true then level is
@@ -1027,6 +1026,22 @@ The usual way as with Log::Any:
my $other_log = Log::Any->get_logger(category => $category);
+=head2 How do I set default level for certain output, but allow this to be overriden in environment/command line?
+If you set level as an argument to init, i.e.:
+ use Log::Any::App -screen => {level=>'off'};
+then you will not be able to override this via environment/command line, because
+init argument takes precedence. However, if yo do this:
+ use Log::Any::App; # screen log level is default
+ BEGIN { our $Screen_Log_Level = 'off' }
+then you will be able to override the screen log level using environment
+SCREEN_LOG_LEVEL (or SCREEN_DEBUG=1, and so on) or command-line
+--screen-log-level (or --screen-debug, and so on).
=head2 How do I see the Log4perl configuration that gets used?
Set environment LOGANYAPP_DEBUG to true, and Log::Any::App will dump

0 comments on commit 56e4cce

Please sign in to comment.
Something went wrong with that request. Please try again.