© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com

com.bitfactoryinc.logging
Class EmailLogger

java.lang.Object
  |
  +--com.bitfactoryinc.logging.Logger
        |
        +--com.bitfactoryinc.logging.EmailLogger

public class EmailLogger
extends Logger

Instances of this class will send an email message when they are logged to. If the subject attribute is not explicitly set, then it will automatically be filled with the logEntry's application, category, and severity.


Field Summary
private  java.lang.String from
           
private  java.lang.String smtpHostName
           
private  java.lang.String subject
           
private  java.lang.String to
           
 
Fields inherited from class com.bitfactoryinc.logging.Logger
application, defaultFilterClass, defaultFormatterClass, enabled, filter, formatter
 
Constructor Summary
EmailLogger(java.lang.String anSmtpHostName, java.lang.String aFrom, java.lang.String aTo)
           
EmailLogger(java.lang.String anSmtpHostName, java.lang.String aFrom, java.lang.String aTo, java.lang.String aSubject)
           
 
Method Summary
protected  boolean doLog(LogEntry aLogEntry)
          We're past filtering at this point.
 java.lang.String getFrom()
           
 java.lang.String getSmtpHostName()
           
 java.lang.String getSubject()
           
 java.lang.String getTo()
           
 void setFrom(java.lang.String newFrom)
           
 void setSmtpHostName(java.lang.String newSmtpHostName)
           
 void setSubject(java.lang.String newSubject)
           
 void setTo(java.lang.String newTo)
           
 
Methods inherited from class com.bitfactoryinc.logging.Logger
getApplication, getDefaultFilterClass, getDefaultFormatterClass, getFilter, getFormatter, getSeverityThreshold, isEnabled, log, log, log, logCritical, logCritical, logDebug, logDebug, logError, logError, logFatal, logFatal, logInfo, logInfo, logStatus, logStatus, logWarning, logWarning, setApplication, setDefaultFilter, setDefaultFilterClass, setDefaultFormatter, setDefaultFormatterClass, setEnabled, setFilter, setFormatter, setSeverityThreshold, shouldLog, writeToLog
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

from

private java.lang.String from

to

private java.lang.String to

smtpHostName

private java.lang.String smtpHostName

subject

private java.lang.String subject
Constructor Detail

EmailLogger

public EmailLogger(java.lang.String anSmtpHostName,
                   java.lang.String aFrom,
                   java.lang.String aTo)

EmailLogger

public EmailLogger(java.lang.String anSmtpHostName,
                   java.lang.String aFrom,
                   java.lang.String aTo,
                   java.lang.String aSubject)
Method Detail

doLog

protected boolean doLog(LogEntry aLogEntry)
Description copied from class: Logger
We're past filtering at this point. Now it's time to really log aLogEntry. Subclasses might want to do something more interesting and override this method.
Overrides:
doLog in class Logger

getFrom

public java.lang.String getFrom()

getSmtpHostName

public java.lang.String getSmtpHostName()

getSubject

public java.lang.String getSubject()

getTo

public java.lang.String getTo()

setFrom

public void setFrom(java.lang.String newFrom)

setSmtpHostName

public void setSmtpHostName(java.lang.String newSmtpHostName)

setSubject

public void setSubject(java.lang.String newSubject)

setTo

public void setTo(java.lang.String newTo)

© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com