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

Unable to configure socket appender with attribute useXml = true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Code
    • 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
        */

      Attachments

        Activity

          People

            Unassigned Unassigned
            dhansen Dan Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: