Top Description Fields Constructors Methods
ch.qos.logback.classic.net

public Class SMTPAppender

extends SMTPAppenderBase<ILoggingEvent>
Class Inheritance
Imports
ch.qos.logback.classic.ClassicConstants, .PatternLayout, ch.qos.logback.classic.boolex.OnErrorEvaluator, ch.qos.logback.classic.spi.ILoggingEvent, ch.qos.logback.core.Layout, ch.qos.logback.core.boolex.EventEvaluator, ch.qos.logback.core.helpers.CyclicBuffer, ch.qos.logback.core.net.SMTPAppenderBase, java.util.List, java.util.concurrent.Future, org.slf4j.Marker

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
Authors
Ceki Gülcü, Sébastien Pennec

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private boolean
Inherited from ch.qos.logback.core.net.SMTPAppenderBase:
asynchronousSendingFuturecbTrackerdiscriminatoreventEvaluatorlayoutsessionsubjectLayout

Constructor Summary

AccessConstructor and Description
public
SMTPAppender()

The default constructor will instantiate the appender with a EventEvaluator that will trigger on events with level ERROR or higher.

public
SMTPAppender(EventEvaluator<ILoggingEvent> eventEvaluator)

Use the parameter as the EventEvaluator for this SMTPAppender.

Method Summary

Modifier and TypeMethod and Description
protected boolean
protected void
pack-priv Future<?>
public boolean
protected PatternLayout
protected Layout<ILoggingEvent>
makeSubjectLayout(String subjectStr)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.makeSubjectLayout.

return a layout for the subject string as appropriate for the module.
public void
setIncludeCallerData(boolean includeCallerData)

public void
protected void
subAppend(CyclicBuffer<ILoggingEvent> cb, ILoggingEvent event)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.subAppend.

Perform SMTPAppender specific appending actions, mainly adding the event to a cyclic buffer.
Inherited from ch.qos.logback.core.net.SMTPAppenderBase:
addToappendcheckEntryConditionsgetCharsetEncodinggetCyclicBufferTrackergetDiscriminatorgetFromgetJndiLocationgetLayoutgetLocalhostgetPasswordgetSMTPHostgetSmtpHostgetSMTPPortgetSmtpPortgetSubjectgetToAsListOfStringgetToListgetUsernameisAsynchronousSendingisSessionViaJNDIisSSLisSTARTTLSsendBuffersetAsynchronousSendingsetCharsetEncodingsetCyclicBufferTrackersetDiscriminatorsetEvaluatorsetFromsetJndiLocationsetLayoutsetLocalhostsetPasswordsetSessionViaJNDIsetSMTPHostsetSmtpHostsetSMTPPortsetSmtpPortsetSSLsetSTARTTLSsetSubjectsetUsernamestopupdateMimeMsg

Field Detail

DEFAULT_SUBJECT_PATTERNback to summary
pack-priv static final String DEFAULT_SUBJECT_PATTERN
includeCallerDataback to summary
private boolean includeCallerData

Constructor Detail

SMTPAppenderback to summary
public SMTPAppender()

The default constructor will instantiate the appender with a EventEvaluator that will trigger on events with level ERROR or higher.

SMTPAppenderback to summary
public SMTPAppender(EventEvaluator<ILoggingEvent> eventEvaluator)

Use the parameter as the EventEvaluator for this SMTPAppender.

Method Detail

eventMarksEndOfLifeback to summary
protected boolean eventMarksEndOfLife(ILoggingEvent eventObject)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.eventMarksEndOfLife.

fillBufferback to summary
protected void fillBuffer(CyclicBuffer<ILoggingEvent> cb, StringBuffer sbuf)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.fillBuffer.

Annotations
@Override
getAsynchronousSendingFutureback to summary
pack-priv Future<?> getAsynchronousSendingFuture()
isIncludeCallerDataback to summary
public boolean isIncludeCallerData()
makeNewToPatternLayoutback to summary
protected PatternLayout makeNewToPatternLayout(String toPattern)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.makeNewToPatternLayout.

makeSubjectLayoutback to summary
protected Layout<ILoggingEvent> makeSubjectLayout(String subjectStr)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.makeSubjectLayout.

Doc from ch.qos.logback.core.net.SMTPAppenderBase.makeSubjectLayout.

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.

Returns:Layout<ILoggingEvent>

a layout as appropriate for the module

Annotations
@Override
setIncludeCallerDataback to summary
public void setIncludeCallerData(boolean includeCallerData)
startback to summary
public void start()

Overrides ch.qos.logback.core.net.SMTPAppenderBase.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Doc from ch.qos.logback.core.net.SMTPAppenderBase.start.

Start the appender

subAppendback to summary
protected void subAppend(CyclicBuffer<ILoggingEvent> cb, ILoggingEvent event)

Implements abstract ch.qos.logback.core.net.SMTPAppenderBase.subAppend.

Perform SMTPAppender specific appending actions, mainly adding the event to a cyclic buffer.