org.jlf.log.fileMechanisms
Class SharedFileLoggingMechanism

java.lang.Object
  |
  +--org.jlf.log.AbstractLoggingMechanism
        |
        +--org.jlf.log.fileMechanisms.AbstractFileLoggingMechanism
              |
              +--org.jlf.log.fileMechanisms.SharedFileLoggingMechanism
Direct Known Subclasses:
SharedDatedFileLoggingMechanism

public class SharedFileLoggingMechanism
extends AbstractFileLoggingMechanism

This logging mechanism is shared among all of the different logs which attempt to use it, instead of creating a new log file for every log (which the "Unique" logging mechanisms do).


Field Summary
protected static SharedFileLoggingMechanism singleton
           
 
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
SharedFileLoggingMechanism()
           
 
Method Summary
static AbstractLoggingMechanism getInstance()
           
 java.lang.String loggingPrefix(Log log, int loggingLevel)
          Shared logging needs an additional qualifier on each message logged, prefix the message with the log name.
 
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, isDatedLog, isSharedLog, logString, notifyLogClosed, notifyLoggingLevelChange, notifyLogOpened, openForLog, rollLogOver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

singleton

protected static SharedFileLoggingMechanism singleton
Constructor Detail

SharedFileLoggingMechanism

public SharedFileLoggingMechanism()
Method Detail

getInstance

public static AbstractLoggingMechanism getInstance()

loggingPrefix

public java.lang.String loggingPrefix(Log log,
                                      int loggingLevel)
Shared logging needs an additional qualifier on each message logged, prefix the message with the log name.

Overrides:
loggingPrefix in class AbstractLoggingMechanism