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, getFrom, getLayout, getMessage, getPassword, getSMTPHost, getSMTPPort, getSubject, getTo, getUsername, isSSL, isSTARTTLS, sendBuffer, setCharsetEncoding, setEvaluator, setFrom, setLayout, setMessage, setPassword, setSMTPHost, 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 |
cb
protected CyclicBuffer<ILoggingEvent> cb
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()
- Specified by:
start in interface LifeCycle- Overrides:
start in class SMTPAppenderBase<ILoggingEvent>
subAppend
protected void subAppend(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(StringBuffer sbuf)
- Specified by:
fillBuffer in class SMTPAppenderBase<ILoggingEvent>
setBufferSize
public void setBufferSize(int bufferSize)
- The BufferSize option takes a positive integer representing the
maximum number of logging events to collect in a cyclic buffer. When the
BufferSize is reached, oldest events are deleted as new
events are added to the buffer. By default the size of the cyclic buffer is
512 events.
getBufferSize
public int getBufferSize()
- Returns value of the BufferSize option.
makeSubjectLayout
protected Layout<ILoggingEvent> makeSubjectLayout(String subjectStr)
- Specified by:
makeSubjectLayout in class SMTPAppenderBase<ILoggingEvent>
Copyright © 2005-2010 QOS.ch. All Rights Reserved.