org.jlf.log.fileMechanisms
Class UniqueDatedFileLoggingMechanism

java.lang.Object
  |
  +--org.jlf.log.AbstractLoggingMechanism
        |
        +--org.jlf.log.fileMechanisms.AbstractFileLoggingMechanism
              |
              +--org.jlf.log.fileMechanisms.UniqueFileLoggingMechanism
                    |
                    +--org.jlf.log.fileMechanisms.UniqueDatedFileLoggingMechanism

public class UniqueDatedFileLoggingMechanism
extends UniqueFileLoggingMechanism

This logging mechanism adds today's date to the log file name, and also rolls logging over to a new file when dates change (the first new string logged on a new date causes the current log file to close and a new log file to be opened with today's date).


Field Summary
 
Fields inherited from class org.jlf.log.fileMechanisms.AbstractFileLoggingMechanism
currentFileName, fileOutputStream, logPath
 
Fields inherited from class org.jlf.log.AbstractLoggingMechanism
compactDateFormat, dateFormat, dateOpened, logs, printStream, timeFormat
 
Constructor Summary
UniqueDatedFileLoggingMechanism()
           
 
Method Summary
static AbstractLoggingMechanism getInstance()
           
protected  boolean isDatedLog()
          Mechanisms can be dated or non-dated.
 
Methods inherited from class org.jlf.log.fileMechanisms.UniqueFileLoggingMechanism
isSharedLog
 
Methods inherited from class org.jlf.log.fileMechanisms.AbstractFileLoggingMechanism
close, getFileName, logFileNamePrefix, logFileNameSuffix, open, toString
 
Methods inherited from class org.jlf.log.AbstractLoggingMechanism
closeForLog, compactCurrentDate, currentDate, currentTime, getLoggingMechanismForString, getName, hasDateRolledOver, loggingPrefix, logString, notifyLogClosed, notifyLoggingLevelChange, notifyLogOpened, openForLog, rollLogOver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniqueDatedFileLoggingMechanism

public UniqueDatedFileLoggingMechanism()
Method Detail

getInstance

public static AbstractLoggingMechanism getInstance()

isDatedLog

protected boolean isDatedLog()
Description copied from class: AbstractLoggingMechanism
Mechanisms can be dated or non-dated. If dated, the log needs to have a date appended to a file name (if it has one) and it must be rolled over to a new one when the current date changes. The default setting is non-dated, this method must be overridden when dated.

Overrides:
isDatedLog in class AbstractLoggingMechanism