java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<IAccessEvent>
ch.qos.logback.core.net.SMTPAppenderBase<IAccessEvent>
ch.qos.logback.access.common.net.SMTPAppender
- All Implemented Interfaces:
ch.qos.logback.core.Appender<IAccessEvent>
,ch.qos.logback.core.spi.ContextAware
,ch.qos.logback.core.spi.FilterAttachable<IAccessEvent>
,ch.qos.logback.core.spi.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, MAIL_SMTP_AUTH_PK, MAIL_SMTP_HOST_PK, MAIL_SMTP_LOCALHOST_PK, MAIL_SMTP_PORT_PK, MAIL_SMTP_SSL_ENABLE_PK, MAIL_SMTP_STARTTLS_ENABLE_PK, MAIL_TRANSPORT_PROTOCOL_PK, session, 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
ConstructorDescriptionThe default constructor will instantiate the appender with aEventEvaluator
that will trigger on events with level ERROR or higher.SMTPAppender
(ch.qos.logback.core.boolex.EventEvaluator<IAccessEvent> evaluator) Useevaluator
passed as parameter as theEventEvaluator
for this SMTPAppender. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
eventMarksEndOfLife
(IAccessEvent eventObject) protected void
fillBuffer
(ch.qos.logback.core.helpers.CyclicBuffer<IAccessEvent> cb, StringBuffer sbuf) protected PatternLayout
makeNewToPatternLayout
(String toPattern) protected ch.qos.logback.core.Layout
<IAccessEvent> makeSubjectLayout
(String subjectStr) protected void
subAppend
(ch.qos.logback.core.helpers.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, updateMimeMsg
Methods inherited from class ch.qos.logback.core.AppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, 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
-
Constructor Details
-
SMTPAppender
public SMTPAppender()The default constructor will instantiate the appender with aEventEvaluator
that will trigger on events with level ERROR or higher. -
SMTPAppender
Useevaluator
passed as parameter as theEventEvaluator
for this SMTPAppender.
-
-
Method Details
-
subAppend
protected void subAppend(ch.qos.logback.core.helpers.CyclicBuffer<IAccessEvent> cb, IAccessEvent event) Perform SMTPAppender specific appending actions, mainly adding the event to the appropriate cyclic buffer.- Specified by:
subAppend
in classch.qos.logback.core.net.SMTPAppenderBase<IAccessEvent>
-
fillBuffer
protected void fillBuffer(ch.qos.logback.core.helpers.CyclicBuffer<IAccessEvent> cb, StringBuffer sbuf) - Specified by:
fillBuffer
in classch.qos.logback.core.net.SMTPAppenderBase<IAccessEvent>
-
makeSubjectLayout
- Specified by:
makeSubjectLayout
in classch.qos.logback.core.net.SMTPAppenderBase<IAccessEvent>
-
makeNewToPatternLayout
- Specified by:
makeNewToPatternLayout
in classch.qos.logback.core.net.SMTPAppenderBase<IAccessEvent>
-
eventMarksEndOfLife
- Specified by:
eventMarksEndOfLife
in classch.qos.logback.core.net.SMTPAppenderBase<IAccessEvent>
-