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 "Knut Urdalen (JIRA)" <ji...@apache.org> on 2009/04/29 22:51:30 UTC

[jira] Resolved: (LOG4PHP-19) Logger location info is invalid in log outputs of Logger's subclasses.

     [ https://issues.apache.org/jira/browse/LOG4PHP-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Urdalen resolved LOG4PHP-19.
---------------------------------

    Resolution: Fixed

> Logger location info is invalid in log outputs of Logger's subclasses.
> ----------------------------------------------------------------------
>
>                 Key: LOG4PHP-19
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-19
>             Project: Log4php
>          Issue Type: Bug
>         Environment: log4php r692607,
> PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2,
> Ubuntu 8.04 
>            Reporter: Yomei Komiya
>             Fix For: 2.0
>
>
> 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;
> -----------------------------------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.