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);
+               }
        }
 
        /**


Reply via email to