sdsu.logging
Class FileLogger
java.lang.Object
|
+--sdsu.logging.LoggerImplementation
|
+--sdsu.logging.SelectiveLogger
|
+--sdsu.logging.FileLogger
- public class FileLogger
- extends SelectiveLogger
This logger directs all log messages to a file.
As a SelectiveLogger, message types can be turned
off.
- Version:
- 1.1 18 January 1998
- Author:
- Roger Whitney
(whitney@cs.sdsu.edu)
- See Also:
Logger
,
SelectiveLogger
Method Summary |
static LoggerImplementation |
register(java.lang.String fileName)
Create a FileLogger in append mode on the file indicated
and register it with Logger. |
static FileLogger |
register(java.lang.String fileName,
boolean append)
Create a FileLogger on the file indicated
and register it with Logger. |
void |
reset()
Resets logger. |
Methods inherited from class sdsu.logging.SelectiveLogger |
debugOff,
debugOn,
errorOff,
errorOn,
log,
logOff,
logOn,
messageTypeOff,
messageTypeOn,
warningOff,
warningOn |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
register
public static LoggerImplementation register(java.lang.String fileName)
throws LoggerCreationException
- Create a FileLogger in append mode on the file indicated
and register it with Logger.
- Parameters:
fileName
- ".log" will be appended to fileName if it
does not already end in ".log"
Returns the current active logger. If a logger has
previously been set, it will be that logger.
register
public static FileLogger register(java.lang.String fileName,
boolean append)
throws LoggerCreationException
- Create a FileLogger on the file indicated
and register it with Logger.
- Parameters:
append
- if true open file in append mode, if false
overwrite filefileName
- ".log" will be appended to fileName if it
does not already end in ".log"
reset
public void reset()
- Resets logger. Erases any permanment storage of the log.
This is to allow students to reset their log file. Not
normally part of a logging system.
- Overrides:
- reset in class LoggerImplementation