public class FileLoggingEndpoint extends Object implements LoggingEndpoint
LoggingEndpoint
for ordinary files.Modifier and Type | Field and Description |
---|---|
private BufferedWriter |
out |
private static String[] |
types |
ERROR, INFO, STATUS, WARNING
Constructor and Description |
---|
FileLoggingEndpoint(String filename)
Construct a new
FileLoggingEndpoint . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the log file.
|
void |
logMessage(int type,
String message)
Write a message to the log file.
|
private BufferedWriter out
public FileLoggingEndpoint(String filename) throws IOException
FileLoggingEndpoint
.filename
- The name of the file to which log messages will be
written.IOException
- If the file could not be opened for
writing.public void logMessage(int type, String message)
logMessage
in interface LoggingEndpoint
type
- The message type; one of the static constants defined in
LoggingEndpoint
.message
- The message to be written.public void close()
close
in interface LoggingEndpoint
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses