Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-236

SMTPAppender does not interpolate variables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.0-beta5
    • 2.0-beta6
    • Appenders
    • None
    • OS X 10.7 Lion (11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64)

    Description

      When configuring an SMTP appender as follows, I would expect the smtpHost property to be interpolated, and the appropriate environment variable substituted:

      <SMTP name="Mailer" subject="Error" to="test@test.com" from="do-not-reply@test.com"
      smtpHost="${env:SMTP_HOST}" smtpPort="25" bufferSize="1"></SMTP>

      Instead, Log4J complains that the host ${env:SMTP_HOST} is unknown.

      The documentation does not state that these variables cannot be interpolated, so from reading the manual I would assume this is a bug and not, in fact, by design.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tomrk1089 Thomas Golden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: