Class JDKLoggingRouter


public final class JDKLoggingRouter extends NullTracer
This specialised NullTracer redirects log messages to the core logging facilities of the Java platform, see java.util.logging. The LogLevels will be translated into the Levels used by loggers of the Java platform. All of the other tracing output will be discarded.
Author:
Christof Reichardt
  • Constructor Details

    • JDKLoggingRouter

      public JDKLoggingRouter()
  • Method Details

    • convertToJDK14Level

      protected Level convertToJDK14Level(LogLevel logLevel)
      Translates the LogLevels into Levels.
      Parameters:
      logLevel - the to be translated LogLevel
      Returns:
      the corresponding Level
    • logMessage

      public void logMessage(LogLevel logLevel, String message, Class clazz, String methodName)
      Calls the Logger for the given clazz.
      Overrides:
      logMessage in class NullTracer
      Parameters:
      logLevel - the log level
      message - the to be logged message
      clazz - the originating class
      methodName - the originating method
    • logException

      public void logException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName)
      Calls the Logger for the given clazz.
      Overrides:
      logException in class NullTracer
      Parameters:
      logLevel - the log level
      throwable - the to be logged throwable
      clazz - the originating class
      methodName - the name of the relevant method