Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-20

SMTPHost property name incorrect in documentation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-site
    • Labels:
      None
    • Environment:

      Linux hostname-03 2.6.27-17-server #1 SMP Fri Mar 12 04:04:33 UTC 2010 i686 GNU/Linux

      Description

      The following documentation appears to have some incorrect information: http://logback.qos.ch/manual/appenders.html#SMTPAppender

      The table includes a property named "smtpHost". Using this value results in logback ignoring the setting and attempting to send mail through localhost.
      The correct property name appears to be "SMTPHost". The documentation also states that the parameter is mandatory. It appears to fall back to localhost if it is not encountered (perhaps java-mail is doing that).

      I would assume that "smtpPort" is incorrect too based on the setter name of "SMTPPort" in SMTPAppenderBase.

      Log info:

      -INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender]
      -INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [TEST]
      -ERROR in ch.qos.logback.core.joran.spi.Interpreter@22:13 - no applicable action for [smtpHost], current pattern is [[configuration][appender][smtpHost]]
      -INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender]
      ...
      -ERROR in ch.qos.logback.classic.net.SMTPAppender[POR] - Error occured while sending e-mail notification. javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused))
      at javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused))
      at at javax.mail.Transport.send(Transport.java:163)
      at at javax.mail.Transport.send(Transport.java:48)
      at at ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:323)
      at at ch.qos.logback.core.net.SMTPAppenderBase.append(SMTPAppenderBase.java:181)
      at at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:85)

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              junkmail@jarretttaylor.com Jay Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: