Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
log4php r692607,
PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2,
Ubuntu 8.04
Description
When I log it by the original logger subclass of Logger, its location information (%F, %L, %M) is not appropriate.
It seems that parent class identification of logger class failed.
patch as follows.
-----------------------------------------------------------------------------------
diff -urN log4php/spi/LoggerLoggingEvent.php log4php.new/spi/LoggerLoggingEvent.php
— log4php/spi/LoggerLoggingEvent.php
+++ log4php.new/spi/LoggerLoggingEvent.php
@@ -184,7 +184,8 @@
while ($hop !== null) {
$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') {
+ @strtolower(get_parent_class($className)) == 'logger' or
+ @strtolower(get_parent_class($className)) == 'loggercategory')) {
$locationInfo['line'] = $hop['line'];
$locationInfo['file'] = $hop['file'];
break;
-----------------------------------------------------------------------------------