[logback-dev] [JIRA] (LOGBACK-1284) Added the feature to update mime message before sending the email

QOS.CH (JIRA) noreply-jira at qos.ch
Sun Mar 19 23:36:00 CET 2017


Miguel Vale created LOGBACK-1284:
------------------------------------

             Summary: Added the feature to update mime message before sending the email
                 Key: LOGBACK-1284
                 URL: https://jira.qos.ch/browse/LOGBACK-1284
             Project: logback
          Issue Type: Improvement
          Components: logback-core
    Affects Versions: 1.2.1
         Environment: h1.  
            Reporter: Miguel Vale
            Assignee: Logback dev list
            Priority: Trivial


h1. Useful to extend the SMTPAppender class in order to add some Email Headers such as X-Priority, In-Reply-To, ...

 

Example of usage:

 

... updateMimeMsg(...) \{ 

  Level highLevel = cb.asList().stream().map(ILoggingEvent::getLevel).max(comparingInt(Level::toInt)).orElse(Level.DEBUG);

   mimeMsg.setHeader("X-Priority", convertToPriorityString(highLevel));

} 



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list