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 gr...@apache.org on 2009/05/23 23:09:00 UTC

svn commit: r778027 - /incubator/log4php/trunk/src/main/php/filters/LoggerFilterLevelRange.php

Author: grobmeier
Date: Sat May 23 21:08:59 2009
New Revision: 778027

URL: http://svn.apache.org/viewvc?rev=778027&view=rev
Log:
should be possible to add an object instead of a string as a matching level

Modified:
    incubator/log4php/trunk/src/main/php/filters/LoggerFilterLevelRange.php

Modified: incubator/log4php/trunk/src/main/php/filters/LoggerFilterLevelRange.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/filters/LoggerFilterLevelRange.php?rev=778027&r1=778026&r2=778027&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/filters/LoggerFilterLevelRange.php (original)
+++ incubator/log4php/trunk/src/main/php/filters/LoggerFilterLevelRange.php Sat May 23 21:08:59 2009
@@ -97,7 +97,11 @@
 	 * @param string $l the level min to match
 	 */
 	function setLevelMin($l) {
-		$this->levelMin = LoggerOptionConverter::toLevel($l, null);
+		if(is_a($l, 'LoggerLevel')) {
+		    $this->levelMin = $l;
+		} else {
+			$this->levelMin = LoggerOptionConverter::toLevel($l, null);
+		}
 	}
 
 	/**
@@ -111,7 +115,11 @@
 	 * @param string $l the level max to match
 	 */
 	function setLevelMax($l) {
-		$this->levelMax = LoggerOptionConverter::toLevel($l, null);
+		if(is_a($l, 'LoggerLevel')) {
+		    $this->levelMax = $l;
+		} else {
+			$this->levelMax = LoggerOptionConverter::toLevel($l, null);
+		}
 	}
 
 	/**