Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-358

SMTPAppender generating Emails with an empty body

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: Appender
    • Environment:
      Linux lx-chdsd02 2.6.9-67.0.1.ELsmp #1 SMP Fri Nov 30 11:57:43 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

      Description

      After compiling log4cxx with -DLOG4CXX_HAS_LIBESMTP defined to get the SMTPAppender working, the SMTPAppender now generates Emails as expected. However, the body of the Email message is always blank. Is anyone else experiencing this problem? Here's my DOMConfigurator configuration file.

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

      <log4j:configuration debug="true" xmlns:log4j="http://jakarta.apache.org/log4j/">
      <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d

      {ABSOLUTE} %5p %c{1}:%L - %m%n"/>
      </layout>
      </appender>

      <appender name="mail" class="org.apache.log4j.net.SMTPAppender">
      <param name="SMTPHost" value="mailhost"/>
      <param name="From" value="somebody@domain.com"/>
      <param name="To" value="removed@domain.com"/>
      <param name="Subject" value="log4cxx test"/>
      <param name="BufferSize" value="10"/>
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{ABSOLUTE}

      %5p %c

      {1}

      :%L - %m%n"/>
      </layout>
      </appender>

      <root>
      <priority value="info"></priority>
      <appender-ref ref="stdout"/>
      <appender-ref ref="mail"/>
      </root>
      </log4j:configuration>

        Attachments

        1. smtpappender.patch
          1 kB
          Tobias Hoehmann

          Activity

            People

            • Assignee:
              chand Chand Priyaukara Gamage
              Reporter:
              rhart Ryan L Hart
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: