Interface Logger

All Known Implementing Classes:
LogbackLogger

@API(status=STABLE, since="1.0", consumers="LogbackLogger") @Component public interface Logger
Simple API for application logging.
Since:
1.0
Version:
1.2
Author:
elmar.dott@gmail.com
  • Field Details

    • FEATURE_ID

      @API(status=STABLE, since="1.2") static final String FEATURE_ID
      Identifier for the given feature.
      See Also:
  • Method Details

    • log

      @API(status=STABLE, since="1.0") LogLevel log(String message, LogLevel level)
      Create a log entry with the given message for the configured LogLevel. Log-Level: TRACE | DEBUG | INFO | WARN | ERROR
      Parameters:
      message - as String.
      level - as LogLevel.
      Returns:
      LogLevel
    • getConfiguredLogLevel

      @API(status=STABLE, since="1.0") LogLevel getConfiguredLogLevel()
      Get the configured LogLevel for the Logger.
      Returns:
      LogLevel
    • catchException

      @API(status=STABLE, since="1.0") String catchException(Exception ex)
      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.
      Parameters:
      ex - as Exception
      Returns:
      exception message as String