public class SMTPOutputLogTarget extends AbstractOutputTarget
| Constructor and Description |
|---|
SMTPOutputLogTarget(javax.mail.Session session,
javax.mail.Address[] toAddresses,
javax.mail.Address fromAddress,
String subject,
int maxMsgSize,
Formatter formatter)
SMTPOutputLogTarget constructor.
|
SMTPOutputLogTarget(javax.mail.Session session,
javax.mail.Address[] toAddresses,
javax.mail.Address fromAddress,
String subject,
int maxMsgSize,
int maxDelayTime,
Formatter formatter)
SMTPOutputLogTarget constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this log target.
|
void |
setDebug(boolean flag)
Method to enable/disable debugging on the mail session.
|
protected void |
write(String data)
Method to write data to the log target.
|
doProcessEvent, getFormatter, opengetErrorHandler, isOpen, processEvent, setErrorHandlerpublic SMTPOutputLogTarget(javax.mail.Session session,
javax.mail.Address[] toAddresses,
javax.mail.Address fromAddress,
String subject,
int maxMsgSize,
int maxDelayTime,
Formatter formatter)
session - mail session to be usedtoAddresses - addresses logs should be sent tofromAddress - address logs say they come fromsubject - subject line logs should usemaxMsgSize - maximum size of any log mail, in units of log events.
If this is greater than one but maxDelayTime is 0 then
log events may stay queued for a long period of time
if less than the specified number of messages are
logged. Any unset messages will be sent when the
target is closed.maxDelayTime - specifies the longest delay in seconds that a log
entry will be queued before being sent. Setting
this to a value larger than 0 will cause a
background thread to be used to queue up and send
messages. Ignored if maxMsgSize is 1 or less.formatter - log formatter to usepublic SMTPOutputLogTarget(javax.mail.Session session,
javax.mail.Address[] toAddresses,
javax.mail.Address fromAddress,
String subject,
int maxMsgSize,
Formatter formatter)
session - mail session to be usedtoAddresses - addresses logs should be sent tofromAddress - address logs say they come fromsubject - subject line logs should usemaxMsgSize - maximum size of any log mail, in units of log events.
Log events may stay queued for a long period of time
if less than the specified number of messages are
logged. Any unset messages will be sent when the
target is closed.formatter - log formatter to useprotected void write(String data)
write in class AbstractOutputTargetdata - logging data to be written to targetpublic void close()
close in interface Closeableclose in class AbstractOutputTargetpublic void setDebug(boolean flag)
flag - true to enable debugging, false to disable itCopyright © 1997–2019. All rights reserved.