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 ma...@apache.org on 2006/01/25 14:22:47 UTC

svn commit: r372206 - /logging/log4php/trunk/src/php5/log4php/spi/LoggerLoggingEvent.php

Author: marco
Date: Wed Jan 25 05:22:42 2006
New Revision: 372206

URL: http://svn.apache.org/viewcvs?rev=372206&view=rev
Log:
Now getLocationInformation() should handle debug_backtrace() output from php5 and php5.1

Modified:
    logging/log4php/trunk/src/php5/log4php/spi/LoggerLoggingEvent.php

Modified: logging/log4php/trunk/src/php5/log4php/spi/LoggerLoggingEvent.php
URL: http://svn.apache.org/viewcvs/logging/log4php/trunk/src/php5/log4php/spi/LoggerLoggingEvent.php?rev=372206&r1=372205&r2=372206&view=diff
==============================================================================
--- logging/log4php/trunk/src/php5/log4php/spi/LoggerLoggingEvent.php (original)
+++ logging/log4php/trunk/src/php5/log4php/spi/LoggerLoggingEvent.php Wed Jan 25 05:22:42 2006
@@ -172,8 +172,9 @@
                 // make a downsearch to identify the caller
                 $hop = array_pop($trace);
                 while ($hop !== null) {
-                    $className = @$hop['class'];
-                    if ( !empty($className) and ($className == 'Logger' or get_parent_class($className) == 'Logger') ) {
+                    $className = @strtolower($hop['class']);
+                    if ( !empty($className) and ($className == 'logger' or $className == 'loggercategory' or 
+               			get_parent_class($className) == 'logger') or get_parent_class($className) == 'loggercategory') {
                         $locationInfo['line'] = $hop['line'];
                         $locationInfo['file'] = $hop['file'];                         
                         break;