|
Basic Logger 1.0-SNAPSHOT
Basic logger written in Java
|
Public Member Functions | |
| FileLogger (String name, String filePath) | |
| Public Member Functions inherited from ge.edu.sangu.logger.Logger | |
| Logger (String name) | |
| Logger (String name, Formatter formatter) | |
| String | getName () |
| Formatter | getFormatter () |
| void | trace (String message, Object... args) |
| void | debug (String message, Object... args) |
| void | info (String message, Object... args) |
| void | warn (String message, Object... args) |
| void | error (String message, Object... args) |
Protected Member Functions | |
| void | writeToOutput (String output) |
| Protected Member Functions inherited from ge.edu.sangu.logger.Logger | |
| synchronized void | print (@NotNull Level level, String message, @NotNull Object... args) throws IllegalArgumentException |
FileLogger is a concrete implementation of the Logger class responsible for logging messages to a specified file. This class provides functionality for persistent logging by appending log entries to a file located at a given file path.
Each log message is formatted using the Formatter inherited from the Logger class before being written to the file. If the file does not exist, it will be created. If an error occurs while writing to the file, a RuntimeException is thrown.
|
protected |
Outputs a constructed log message into an arbitrary output stream.
| output | output string |
Reimplemented from ge.edu.sangu.logger.Logger.