org.apache.log.output.net
Class SMTPOutputLogTarget
- ErrorAware, LogTarget
public class SMTPOutputLogTarget
Logkit output target that logs data via SMTP (ie. email, email gateways).
CVS $Id: SMTPOutputLogTarget.java,v 1.6 2003/02/09 23:33:25 mcconnell Exp $
SMTPOutputLogTarget(Session session, Address[] toAddresses, Address fromAddress, String subject, int maxMsgSize, Formatter formatter) - SMTPOutputLogTarget constructor, creates a logkit output target
capable of logging to SMTP (ie.
|
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.
|
SMTPOutputLogTarget
public SMTPOutputLogTarget(Session session,
Address[] toAddresses,
Address fromAddress,
String subject,
int maxMsgSize,
Formatter formatter)
SMTPOutputLogTarget constructor, creates a logkit output target
capable of logging to SMTP (ie. email, email gateway) targets.
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 eventsformatter
- log formatter to use
close
public void close()
Closes this log target. Sends currently buffered message, if existing.
- close in interface AbstractOutputTarget
setDebug
public void setDebug(boolean flag)
Method to enable/disable debugging on the mail session.
flag
- true to enable debugging, false to disable it
write
protected void write(String data)
Method to write data to the log target. Logging data is stored in
an internal buffer until the size limit is reached. When this happens
the data is sent to the SMTP target, and the buffer is reset for
subsequent events.
- write in interface AbstractOutputTarget
data
- logging data to be written to target