[Jifty-commit] jifty branch, master, updated. jifty-1.01209-25-g41b366c

Jifty commits jifty-commit at lists.jifty.org
Wed Feb 9 10:33:10 EST 2011

The branch, master has been updated
       via  41b366ca479af5629d77526b3a821f3cae930719 (commit)
      from  bbc7131d763a091291e888cf8725bd76356f352d (commit)

Summary of changes:
 lib/Jifty/Logger.pm            |    5 ++++-
 lib/Jifty/Manual/Deploying.pod |    3 +++
 2 files changed, 7 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 41b366ca479af5629d77526b3a821f3cae930719
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Feb 9 10:31:59 2011 -0500

    Let JIFTY_LOG_LEVEL override LogLevel from the config
    This doesn't have any effect if you have LogConfig set.

diff --git a/lib/Jifty/Logger.pm b/lib/Jifty/Logger.pm
index 53f3292..7f7e0d3 100644
--- a/lib/Jifty/Logger.pm
+++ b/lib/Jifty/Logger.pm
@@ -42,6 +42,9 @@ to the LogLevel configuration option.
       LogLevel: DEBUG
+You can override the LogLevel configuration option by setting JIFTY_LOG_LEVEL
+in your environment.
 You can tell Jifty to use an entirely different Logging
 configuration by specifying the filename of a standard Log4perl
 config file in the LogConfig config option (see L<Log::Log4perl> for
@@ -150,7 +153,7 @@ sub _initialize_log4perl {
     } elsif ( -f $log_config and -r $log_config ) {
     } else {
-        my $log_level = uc Jifty->config->framework('LogLevel');
+        my $log_level = uc($ENV{JIFTY_LOG_LEVEL} || Jifty->config->framework('LogLevel'));
         my %default = (
             'log4perl.rootLogger'        => "$log_level,Screen",
             'log4perl.appender.Screen'   => 'Log::Log4perl::Appender::Screen',
diff --git a/lib/Jifty/Manual/Deploying.pod b/lib/Jifty/Manual/Deploying.pod
index 608f8ac..5f3cc15 100644
--- a/lib/Jifty/Manual/Deploying.pod
+++ b/lib/Jifty/Manual/Deploying.pod
@@ -149,6 +149,9 @@ Depending on your environment, you may want to adjust the default log level or y
 You can set the LogLevel to: DEBUG, INFO, WARN, ERROR, or FATAL to specify the level. If you want a custom log configuration for your server (allowing you to have per-module log settings among other features), you need to set L</LogConfig> and possibly L</LogReload>. See L<Jifty::Logger>
+This configuration setting is overridden by the JIFTY_LOG_LEVEL environment
+variable (if set).
 =item LogReload
 This allows you specify a custom reload period for your log configuration, if you use L</LogConfig>. See L<Jifty::Logger>.


More information about the Jifty-commit mailing list