Package ch.qos.logback.access.net
Class SMTPAppender
- All Implemented Interfaces:
 Appender<IAccessEvent>,ContextAware,FilterAttachable<IAccessEvent>,LifeCycle
Send an e-mail when a specific access event occurs, typically when certain
 pages are accessed.
 
 For more information about this appender, please refer to the online manual
 at http://logback.qos.ch/manual/appenders.html#AccessSMTPAppender
 
- Author:
 - Ceki Gülcü, Sébastien Pennec
 
- 
Field Summary
Fields inherited from class ch.qos.logback.core.net.SMTPAppenderBase
asynchronousSendingFuture, cbTracker, discriminator, eventEvaluator, layout, session, subjectLayoutFields inherited from class ch.qos.logback.core.AppenderBase
name, startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context - 
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor will instantiate the appender with aEventEvaluatorthat will trigger on events with level ERROR or higher.SMTPAppender(EventEvaluator<IAccessEvent> evaluator) Useevaluatorpassed as parameter as theEventEvaluatorfor this SMTPAppender. - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleaneventMarksEndOfLife(IAccessEvent eventObject) protected voidfillBuffer(CyclicBuffer<IAccessEvent> cb, StringBuffer sbuf) protected PatternLayoutmakeNewToPatternLayout(String toPattern) protected Layout<IAccessEvent>makeSubjectLayout(String subjectStr) return a layout for the subject string as appropriate for the module.protected voidsubAppend(CyclicBuffer<IAccessEvent> cb, IAccessEvent event) Perform SMTPAppender specific appending actions, mainly adding the event to the appropriate cyclic buffer.Methods inherited from class ch.qos.logback.core.net.SMTPAppenderBase
addTo, append, checkEntryConditions, getCharsetEncoding, getCyclicBufferTracker, getDiscriminator, getFrom, getJndiLocation, getLayout, getLocalhost, getPassword, getSmtpHost, getSMTPHost, getSmtpPort, getSMTPPort, getSubject, getToAsListOfString, getToList, getUsername, isAsynchronousSending, isSessionViaJNDI, isSSL, isSTARTTLS, sendBuffer, setAsynchronousSending, setCharsetEncoding, setCyclicBufferTracker, setDiscriminator, setEvaluator, setFrom, setJndiLocation, setLayout, setLocalhost, setPassword, setSessionViaJNDI, setSmtpHost, setSMTPHost, setSmtpPort, setSMTPPort, setSSL, setSTARTTLS, setSubject, setUsername, start, stop, updateMimeMsgMethods inherited from class ch.qos.logback.core.AppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext 
- 
Constructor Details
- 
SMTPAppender
public SMTPAppender()The default constructor will instantiate the appender with aEventEvaluatorthat will trigger on events with level ERROR or higher. - 
SMTPAppender
Useevaluatorpassed as parameter as theEventEvaluatorfor this SMTPAppender. 
 - 
 - 
Method Details
- 
subAppend
Perform SMTPAppender specific appending actions, mainly adding the event to the appropriate cyclic buffer.- Specified by:
 subAppendin classSMTPAppenderBase<IAccessEvent>
 - 
fillBuffer
- Specified by:
 fillBufferin classSMTPAppenderBase<IAccessEvent>
 - 
makeSubjectLayout
Description copied from class:SMTPAppenderBasereturn 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:
 makeSubjectLayoutin classSMTPAppenderBase<IAccessEvent>- Returns:
 - a layout as appropriate for the module
 
 - 
makeNewToPatternLayout
- Specified by:
 makeNewToPatternLayoutin classSMTPAppenderBase<IAccessEvent>
 - 
eventMarksEndOfLife
- Specified by:
 eventMarksEndOfLifein classSMTPAppenderBase<IAccessEvent>
 
 -