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

Do not restrict SMTPAppender <to> to only 1 email address

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • None
    • None

    Description

      It's not possible to have multiple email address in <to> element of SMTPAppender because only the first one is used (https://github.com/ceki/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java#L270)
      When using a property, multiple <to> element is not really easy (if even possible)...

      Example:

      <appender name="email" class="ch.qos.logback.classic.net.SMTPAppender">
      ...
      <to>${mail.log.to}</to>
      ...
      </appender>

      With properties :

      mail.log.to = admin@domain.com,dev@domain.com,op@domain.com

      => Only admin@domain.com get the email !

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            zigarn Alexandre Garnier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: