kiwi.util
Class FileLoggingEndpoint
java.lang.Object
|
+--kiwi.util.FileLoggingEndpoint
- public class FileLoggingEndpoint
- extends Object
- implements LoggingEndpoint
An implementation of LoggingEndpoint
for ordinary files.
- Version:
- 1.0 (05/98)
- Author:
- Mark Lindner, PING Software Group
Method Summary |
void |
close()
Close the log file. |
void |
logMessage(int type,
String message)
Write a message to the log file. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FileLoggingEndpoint
public FileLoggingEndpoint(String filename)
throws IOException
- Construct a new
FileLoggingEndpoint
.
- Parameters:
filename
- The name of the file to which log messages will be
written.- Throws:
- IOException - If the file could not be opened for
writing.
logMessage
public void logMessage(int type,
String message)
- Write a message to the log file.
- Specified by:
- logMessage in interface LoggingEndpoint
- Parameters:
type
- The message type; one of the static constants defined in
LoggingEndpoint
.message
- The message to be written.
close
public void close()
- Close the log file. Once the file is closed, this logging endpoint can no
longer be used.
- Specified by:
- close in interface LoggingEndpoint