Package org.europa.together.application
Class LogbackLogger
java.lang.Object
org.europa.together.application.LogbackLogger
- All Implemented Interfaces:
Logger
Implementation of the Logger as Wrapper for SLF4j and logback Framework.
-
Field Summary
Fields inherited from interface org.europa.together.business.Logger
FEATURE_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionModified method to log exceptions.Get the configured LogLevel for the Logger.Create a log entry with the given message for the configured LogLevel.
-
Constructor Details
-
LogbackLogger
Create an instance of the logging class. THe configuration file will be searched in the Directory, where the application is running.- Parameters:
instance
- The instance of the logged CLASS- See Also:
-
/logback.xml If is no configuration present at this position, the logger use the default configuration in the classpath, with the console appender.
-
-
Method Details
-
log
Description copied from interface:Logger
Create a log entry with the given message for the configured LogLevel. Log-Level: TRACE | DEBUG | INFO | WARN | ERROR -
getConfiguredLogLevel
Description copied from interface:Logger
Get the configured LogLevel for the Logger.- Specified by:
getConfiguredLogLevel
in interfaceLogger
- Returns:
- LogLevel
-
catchException
Description copied from interface:Logger
Modified method to log exceptions. The output will be the exception name and the exception message in the LogLevel ERROR. In the case a NullPointerException is thrown, the StackTrace will be logged too.- Specified by:
catchException
in interfaceLogger
- Parameters:
ex
- as Exception- Returns:
- exception message as String
-