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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionModified method to log exceptions.Get the configured LogLevel for the Logger.Return the Name of 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.
see: org/europa/together/configuration/logback.xml If is no configuration present at this position, the logger use the default configuration in the classpath, with the console appender.- Parameters:
instance- The instance of the logged CLASS
-
-
Method Details
-
log
Description copied from interface:LoggerCreate a log entry with the given message for the configured LogLevel. Log-Level: TRACE | DEBUG | INFO | WARN | ERROR -
getLoggerName
Description copied from interface:LoggerReturn the Name of the Logger. THe Loggername is create by the Classname including the full package path of the instance.- Specified by:
getLoggerNamein interfaceLogger- Returns:
- LoggerName as String
-
getConfiguredLogLevel
Description copied from interface:LoggerGet the configured LogLevel for the Logger.- Specified by:
getConfiguredLogLevelin interfaceLogger- Returns:
- LogLevel
-
catchException
Description copied from interface:LoggerModified 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:
catchExceptionin interfaceLogger- Parameters:
ex- as Exception- Returns:
- exception message as String
-