Package org.tweetyproject.web.services
Class LoggerUtil
java.lang.Object
org.tweetyproject.web.services.LoggerUtil
Utility class for configuring a logger with console and file handlers.
The LoggerUtil class provides a static logger instance with both console and file handlers attached.
The log messages are formatted using SimpleFormatter. The log level is set to INFO by default but can be
customized. Log messages are written to both the console and a log file named "server.log" located in the
specified file path.
Usage of this utility class ensures that log messages are directed to both the console and a log file
simultaneously, allowing for effective logging and monitoring of application activities.
Note: The file handler is configured to append to the existing log file (if any) rather than overwriting it.
To customize the log level or handle exceptions during configuration, users can modify the static block
accordingly. The logger instance is accessible as a public static field, e.g., LoggerUtil.logger.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
logger
logger
-
-
Constructor Details
-
LoggerUtil
public LoggerUtil()
-