com.antelmann.util.logging
Class EmailWriter
java.lang.Object
com.antelmann.util.logging.AbstractLogWriter<String>
com.antelmann.util.logging.XMLLogWriter
com.antelmann.util.logging.EmailWriter
- All Implemented Interfaces:
- Filter<LogEntry>, LogWriter, Closeable
public class EmailWriter
- extends XMLLogWriter
uses email to send each LogEntry object over the Internet.
The body of each email message uses the XML format of the super class.
As sending the email may take some time, you should consider using
an AsynchLogWriter with this EmailWriter.
- Author:
- Holger Antelmann
- See Also:
AsynchLogWriter,
EmailAccount
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subjectLine
public static final String subjectLine
- See Also:
- Constant Field Values
EmailWriter
public EmailWriter(EmailAccount service,
String toAddress)
write
public void write(LogEntry entry)
throws LogException
- sends the email
- Specified by:
write in interface LogWriter- Overrides:
write in class AbstractLogWriter<String>
- Throws:
LogException - if an error occurred while writing the log
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads