Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-17

%l Pattern layout raises a protected property access error.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • None
    • None
    • log4php r692607,
      PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2,
      Ubuntu 8.04

    Description

      When I use %l Pattern layout, an access error for LoggerLocationInfo->fullInfo occurred.

      patches as follows.
      ------------------------------------------------------------------------------------------------
      diff -urN log4php/helpers/LoggerPatternConverter.php log4php.new/helpers/LoggerPatternConverter.php
      — log4php/helpers/LoggerPatternConverter.php
      +++ log4php.new/helpers/LoggerPatternConverter.php
      @@ -367,7 +367,7 @@
      $locationInfo = $event->getLocationInformation();
      switch($this->type) {
      case LOG4PHP_LOGGER_PATTERN_PARSER_FULL_LOCATION_CONVERTER:

      • return $locationInfo->fullInfo;
        + return $locationInfo->getFullInfo();
        case LOG4PHP_LOGGER_PATTERN_PARSER_METHOD_LOCATION_CONVERTER:
        return $locationInfo->getMethodName();
        case LOG4PHP_LOGGER_PATTERN_PARSER_LINE_LOCATION_CONVERTER:
        diff -urN log4php/spi/LoggerLocationInfo.php log4php.new/spi/LoggerLocationInfo.php
          • log4php/spi/LoggerLocationInfo.php
            +++ log4php.new/spi/LoggerLocationInfo.php
            @@ -115,4 +115,12 @@ { return ($this->methodName === null) ? LOG4PHP_LOGGER_LOCATION_INFO_NA : $this->methodName; }

            +
            + /**
            + * Returns the full information of the caller.
            + */
            + public function getFullInfo()
            +

            { + return ($this->fullInfo === null) ? LOG4PHP_LOGGER_LOCATION_INFO_NA : $this->fullInfo; + }

            }
            ------------------------------------------------------------------------------------------------

      Attachments

        Activity

          People

            Unassigned Unassigned
            whitestar Yomei Komiya
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: