org.jlf.log.smtpMechanism
Class SMTPLoggingMechanism

java.lang.Object
  |
  +--org.jlf.log.AbstractLoggingMechanism
        |
        +--org.jlf.log.smtpMechanism.SMTPLoggingMechanism

public class SMTPLoggingMechanism
extends AbstractLoggingMechanism

This class emails log text to any number of different email accounts based on severity.


Field Summary
protected static int MAX_LOGGED_SUBJECT_LINE_LENGTH
          Holds the maximum string length that should be placed on the subject line of an email.
protected static SMTPLoggingMechanism singleton
           
 
Fields inherited from class org.jlf.log.AbstractLoggingMechanism
compactDateFormat, dateFormat, dateOpened, logs, printStream, timeFormat
 
Constructor Summary
SMTPLoggingMechanism()
           
 
Method Summary
protected  void close()
          Close the SMTP mechanism.
static AbstractLoggingMechanism getInstance()
          Class instance accessor which answers the singleton instance of the concrete subclass.
protected  void logString(Log log, int loggingLevel, java.lang.String logString)
          Logs the string given to the SNMP manager.
protected  void notifyLogClosed(Log log)
           
protected  void notifyLoggingLevelChange(Log log, int loggingLevel)
           
protected  void notifyLogOpened(Log log)
           
protected  void open(Log log)
          Open the SMTP mechanism, nothing to do.
 java.lang.String toString()
          Return a nice debug string.
 
Methods inherited from class org.jlf.log.AbstractLoggingMechanism
closeForLog, compactCurrentDate, currentDate, currentTime, getLoggingMechanismForString, getName, hasDateRolledOver, isDatedLog, isSharedLog, loggingPrefix, notifyLogOpened, openForLog, rollLogOver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_LOGGED_SUBJECT_LINE_LENGTH

protected static final int MAX_LOGGED_SUBJECT_LINE_LENGTH
Holds the maximum string length that should be placed on the subject line of an email.

See Also:
Constant Field Values

singleton

protected static SMTPLoggingMechanism singleton
Constructor Detail

SMTPLoggingMechanism

public SMTPLoggingMechanism()
Method Detail

getInstance

public static AbstractLoggingMechanism getInstance()
Class instance accessor which answers the singleton instance of the concrete subclass.


notifyLogOpened

protected void notifyLogOpened(Log log)

notifyLogClosed

protected void notifyLogClosed(Log log)
Overrides:
notifyLogClosed in class AbstractLoggingMechanism

notifyLoggingLevelChange

protected void notifyLoggingLevelChange(Log log,
                                        int loggingLevel)
Overrides:
notifyLoggingLevelChange in class AbstractLoggingMechanism

open

protected void open(Log log)
Open the SMTP mechanism, nothing to do.

Overrides:
open in class AbstractLoggingMechanism

close

protected void close()
Close the SMTP mechanism.

Overrides:
close in class AbstractLoggingMechanism

logString

protected void logString(Log log,
                         int loggingLevel,
                         java.lang.String logString)
Logs the string given to the SNMP manager.

Overrides:
logString in class AbstractLoggingMechanism

toString

public java.lang.String toString()
Return a nice debug string.

Overrides:
toString in class AbstractLoggingMechanism