ch.qos.logback.classic.net
Class SMTPAppender
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<E>
ch.qos.logback.core.net.SMTPAppenderBase<ILoggingEvent>
ch.qos.logback.classic.net.SMTPAppender
- All Implemented Interfaces:
- Appender<ILoggingEvent>, ContextAware, FilterAttachable<ILoggingEvent>, LifeCycle
public class SMTPAppender
- extends SMTPAppenderBase<ILoggingEvent>
Send an e-mail when a specific logging event occurs, typically on errors or
fatal errors.
For more information about this appender, please refer to the online manual at
http://logback.qos.ch/manual/appenders.html#SMTPAppender
- Author:
- Ceki Gülcü, Sébastien Pennec
Methods inherited from class ch.qos.logback.core.net.SMTPAppenderBase |
addTo, append, checkEntryConditions, getCharsetEncoding, getCyclicBufferTracker, getDiscriminator, getFrom, getJndiLocation, getLayout, getLocalhost, getMessage, getPassword, getSmtpHost, getSMTPHost, getSmtpPort, getSMTPPort, getSubject, getToAsListOfString, getToList, getUsername, isAsynchronousSending, isSessionViaJNDI, isSSL, isSTARTTLS, sendBuffer, setAsynchronousSending, setCharsetEncoding, setCyclicBufferTracker, setDiscriminator, setEvaluator, setFrom, setJndiLocation, setLayout, setLocalhost, setMessage, setPassword, setSessionViaJNDI, setSmtpHost, setSMTPHost, setSmtpPort, setSMTPPort, setSSL, setSTARTTLS, setSubject, setUsername, stop |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
SMTPAppender
public SMTPAppender()
- The default constructor will instantiate the appender with a
EventEvaluator
that will trigger on events with level
ERROR or higher.
SMTPAppender
public SMTPAppender(EventEvaluator<ILoggingEvent> eventEvaluator)
- Use the parameter as the
EventEvaluator
for this SMTPAppender.
start
public void start()
- Description copied from class:
SMTPAppenderBase
- Start the appender
- Specified by:
start
in interface LifeCycle
- Overrides:
start
in class SMTPAppenderBase<ILoggingEvent>
subAppend
protected void subAppend(CyclicBuffer<ILoggingEvent> cb,
ILoggingEvent event)
- Perform SMTPAppender specific appending actions, mainly adding the event to
a cyclic buffer.
- Specified by:
subAppend
in class SMTPAppenderBase<ILoggingEvent>
fillBuffer
protected void fillBuffer(CyclicBuffer<ILoggingEvent> cb,
StringBuffer sbuf)
- Specified by:
fillBuffer
in class SMTPAppenderBase<ILoggingEvent>
isEventMarkedForBufferRemoval
protected boolean isEventMarkedForBufferRemoval(ILoggingEvent eventObject)
- Specified by:
isEventMarkedForBufferRemoval
in class SMTPAppenderBase<ILoggingEvent>
makeSubjectLayout
protected Layout<ILoggingEvent> makeSubjectLayout(String subjectStr)
- Description copied from class:
SMTPAppenderBase
- return a layout for the subject string as appropriate for the module. If the
subjectStr parameter is null, then a default value for subjectStr should be
used.
- Specified by:
makeSubjectLayout
in class SMTPAppenderBase<ILoggingEvent>
- Returns:
- a layout as appropriate for the module
makeNewToPatternLayout
protected PatternLayout makeNewToPatternLayout(String toPattern)
- Specified by:
makeNewToPatternLayout
in class SMTPAppenderBase<ILoggingEvent>
isIncludeCallerData
public boolean isIncludeCallerData()
setIncludeCallerData
public void setIncludeCallerData(boolean includeCallerData)
Copyright © 2005-2013 QOS.ch. All Rights Reserved.