|
Logback API Version 0.9.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<E>
ch.qos.logback.core.net.SMTPAppenderBase<LoggingEvent>
ch.qos.logback.classic.net.SMTPAppender
public class SMTPAppender
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
Field Summary | |
---|---|
protected CyclicBuffer<LoggingEvent> |
cb
|
Fields inherited from class ch.qos.logback.core.net.SMTPAppenderBase |
---|
eventEvaluator, layout, msg, subjectLayout |
Fields inherited from class ch.qos.logback.core.AppenderBase |
---|
name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
SMTPAppender()
The default constructor will instantiate the appender with a EventEvaluator that will trigger on events with level
ERROR or higher. |
|
SMTPAppender(EventEvaluator eventEvaluator)
Use the parameter as the EventEvaluator for this SMTPAppender. |
Method Summary | |
---|---|
protected void |
fillBuffer(StringBuffer sbuf)
|
int |
getBufferSize()
Returns value of the BufferSize option. |
protected Layout<LoggingEvent> |
makeSubjectLayout(String subjectStr)
return a layout for the subjet string as appropriate for the module. |
void |
setBufferSize(int bufferSize)
The BufferSize option takes a positive integer representing the maximum number of logging events to collect in a cyclic buffer. |
void |
start()
Start the appender |
protected void |
subAppend(LoggingEvent event)
Perform SMTPAppender specific appending actions, mainly adding the event to a cyclic buffer. |
Methods inherited from class ch.qos.logback.core.net.SMTPAppenderBase |
---|
addTo, append, checkEntryConditions, getFrom, getLayout, getMessage, getSMTPHost, getSubject, getTo, sendBuffer, setEvaluator, setFrom, setLayout, setMessage, setSMTPHost, setSubject, stop |
Methods inherited from class ch.qos.logback.core.AppenderBase |
---|
addFilter, clearAllFilters, doAppend, getFilterChainDecision, getFirstFilter, getName, isStarted, setName, toString |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
Field Detail |
---|
protected CyclicBuffer<LoggingEvent> cb
Constructor Detail |
---|
public SMTPAppender()
EventEvaluator
that will trigger on events with level
ERROR or higher.
public SMTPAppender(EventEvaluator eventEvaluator)
EventEvaluator
for this SMTPAppender.
Method Detail |
---|
public void start()
SMTPAppenderBase
start
in interface LifeCycle
start
in class SMTPAppenderBase<LoggingEvent>
protected void subAppend(LoggingEvent event)
subAppend
in class SMTPAppenderBase<LoggingEvent>
protected void fillBuffer(StringBuffer sbuf)
fillBuffer
in class SMTPAppenderBase<LoggingEvent>
public void setBufferSize(int bufferSize)
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.
public int getBufferSize()
protected Layout<LoggingEvent> makeSubjectLayout(String subjectStr)
SMTPAppenderBase
makeSubjectLayout
in class SMTPAppenderBase<LoggingEvent>
|
Logback API Version 0.9.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |