Log4php
  1. Log4php
  2. LOG4PHP-76

Unable to configure socket appender with attribute useXml = true

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Code
    • Labels:
      None

      Description

      Configuring a socket appender as such:
      <appender name="socket" class="LoggerAppenderSocket">
      <param name="remoteHost" value="127.0.0.1" />
      <param name="port" value="8888" />
      <param name="useXml" value="false" />
      </appender>

      Fails with the error:
      PHP Fatal error: Call to undefined method LoggerLayoutXml::getLog4jNamespace() in /apache-log4php/src/main/php/layouts/LoggerLayoutXml.php on line 78

      Patch:

      #P apache-log4php
      Index: src/main/php/layouts/LoggerLayoutXml.php
      ===================================================================
      — src/main/php/layouts/LoggerLayoutXml.php (revision 806229)
      +++ src/main/php/layouts/LoggerLayoutXml.php (working copy)
      @@ -162,6 +162,13 @@
      $this->locationInfo = LoggerOptionConverter::toBoolean($flag, true);
      }

      + /**
      + * @return boolean
      + */
      + public function getLog4jNamespace()

      { + return $this->log4jNamespace; + }

      +
      /**

      • @param boolean
        */

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Hansen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development