You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by ku...@apache.org on 2009/04/28 14:31:55 UTC

svn commit: r769373 - /incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php

Author: kurdalen
Date: Tue Apr 28 12:31:55 2009
New Revision: 769373

URL: http://svn.apache.org/viewvc?rev=769373&view=rev
Log:
fixed #LOG4PHP-25

Modified:
    incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php

Modified: incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php?rev=769373&r1=769372&r2=769373&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php (original)
+++ incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php Tue Apr 28 12:31:55 2009
@@ -71,18 +71,19 @@
     *
     * @static
     */
-    public static function getSystemProperty($key, $def)
-    {
-        LoggerLog::debug("LoggerOptionConverter::getSystemProperty():key=[{$key}]:def=[{$def}].");
+	public static function getSystemProperty($key, $def) {
+		LoggerLog::debug("LoggerOptionConverter::getSystemProperty():key=[{$key}]:def=[{$def}].");
 
-        if (defined($key)) {
-            return (string)constant($key);
-        } elseif (isset($_ENV[$key])) {
-            return (string)$_ENV[$key];
-        } else {
-            return $def;
-        }
-    }
+		if(defined($key)) {
+			return (string)constant($key);
+		} else if(isset($_SERVER[$key])) {
+			return (string)$_SERVER[$key];
+		} else if(isset($_ENV[$key])) {
+			return (string)$_ENV[$key];
+		} else {
+			return $def;
+		}
+	}
 
     /**
      * If <var>$value</var> is <i>true</i>, then <i>true</i> is