Class LogbackRouter


  • public final class LogbackRouter
    extends NullTracer
    A specialized NullTracer which delegates log messages to Logback loggers. For more information about Logback, see Logback.
    Author:
    Christof Reichardt
    • Constructor Detail

      • LogbackRouter

        public LogbackRouter()
    • Method Detail

      • logMessage

        public void logMessage​(LogLevel logLevel,
                               String message,
                               Class<?> clazz,
                               String methodName)
        This method gets itself a LocationAwareLogger by invoking SLF4Js LoggerFactory with the given clazz. Thereupon the LocationAwareLogger will be used to log the given message.
        Overrides:
        logMessage in class NullTracer
        Parameters:
        logLevel - will be converted to an appropriate Logback 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)
        This method gets itself a LocationAwareLogger by invoking SLF4Js LoggerFactory with the given clazz. Thereupon the LocationAwareLogger will be used to log the given throwable.
        Overrides:
        logException in class NullTracer
        Parameters:
        logLevel - will be converted to an appropriate Logback level
        throwable - the to be logged throwable
        clazz - the originating class
        methodName - the name of the relevant method
      • readConfiguration

        protected void readConfiguration​(XPath xpath,
                                         Node node)
        Description copied from class: NullTracer
        Pseudo readConfiguration()-method.
        Overrides:
        readConfiguration in class NullTracer
        Parameters:
        xpath - (ignored)
        node - (ignored)