java.lang.Object
konspire.common.log.AbstractLoggingMechanism
konspire.common.log.AbstractFileLoggingMechanism
- Direct Known Subclasses:
- SharedFileLoggingMechanism, UniqueFileLoggingMechanism
- public abstract class AbstractFileLoggingMechanism
- extends AbstractLoggingMechanism
AbstractFileLoggingMechanism is an abstract class which
defines the format and location of log files,
so they all work consistently for the same application. The default
file name where logs are created is:
[Path][App][LogClass][date].[extn]
where: [Path] = "c:\temp\"
[App] = "App"
[LogClass] = The Java Class name of the Log Class
(only used for unique logs)
[date] = today's date (only used for dated logs)
[extn] = "log"
The [App] default can be overridden by the application, it is taken
from the LogManager class. The [Path] and [extn] defaults can be
overridden by settings in a properties file, see the LogProperties
class for more information.
- Version:
- $Revision: 1.3 $
| Methods inherited from class konspire.common.log.AbstractLoggingMechanism |
closeForLog, compactCurrentDate, currentDate, currentTime, getLoggingMechanismForString, getName, hasDateRolledOver, isDatedLog, isSharedLog, loggingPrefix, logString, notifyLogClosed, notifyLoggingLevelChange, notifyLogOpened, openForLog, rollLogOver |
logPath
protected static java.lang.String logPath
fileOutputStream
protected java.io.FileOutputStream fileOutputStream
currentFileName
protected java.lang.String currentFileName
- Instance variable to hold the current output file name
AbstractFileLoggingMechanism
public AbstractFileLoggingMechanism()
logFileNamePrefix
protected java.lang.String logFileNamePrefix(Log log)
logFileNameSuffix
protected java.lang.String logFileNameSuffix(Log log)
getFileName
public java.lang.String getFileName()
open
protected void open(Log log)
- Description copied from class:
AbstractLoggingMechanism
- This method opens the particular logging mechanism so that messages
can be output to the printSteam instance variable.
- Overrides:
open in class AbstractLoggingMechanism
close
protected void close()
- Description copied from class:
AbstractLoggingMechanism
- This method closes the particular logging mechanism so that messages
no longer get logged to the mechanism. Overrides should call the superclass
method so that printStream gets reset to StdErr in case a subsequent open
has problems and the error can be logged somewhere!
- Overrides:
close in class AbstractLoggingMechanism
toString
public java.lang.String toString()
- Return a nice debug string.
- Overrides:
toString in class AbstractLoggingMechanism