Package de.christofreichardt.diagnosis
Class LogbackRouter
- java.lang.Object
-
- de.christofreichardt.diagnosis.AbstractTracer
-
- de.christofreichardt.diagnosis.NullTracer
-
- de.christofreichardt.diagnosis.LogbackRouter
-
public final class LogbackRouter extends NullTracer
A specializedNullTracerwhich delegates log messages to Logback loggers. For more information about Logback, see Logback.- Author:
- Christof Reichardt
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.christofreichardt.diagnosis.AbstractTracer
AbstractTracer.Exception
-
-
Field Summary
-
Fields inherited from class de.christofreichardt.diagnosis.AbstractTracer
VERSION
-
-
Constructor Summary
Constructors Constructor Description LogbackRouter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlogException(LogLevel logLevel, Throwable throwable, Class<?> clazz, String methodName)This method gets itself a LocationAwareLogger by invoking SLF4Js LoggerFactory with the given clazz.voidlogMessage(LogLevel logLevel, String message, Class<?> clazz, String methodName)This method gets itself a LocationAwareLogger by invoking SLF4Js LoggerFactory with the given clazz.protected voidreadConfiguration(XPath xpath, Node node)Pseudo readConfiguration()-method.-
Methods inherited from class de.christofreichardt.diagnosis.NullTracer
close, entry, entry, entry, initCurrentTracingContext, initCurrentTracingContext, open, out, out, wayout
-
Methods inherited from class de.christofreichardt.diagnosis.AbstractTracer
clearCurrentTracingContext, formatStreamErrorState, formatVersionInfo, getBufferedOutputStream, getBufferSize, getLevel, getName, getNullPrintStream, getThreadMap, getTracePrintStream, isAutoflush, isOnline, isOpened, setAutoflush, setBufferedOutputStream, setBufferSize, setOpened, setTracePrintStream
-
-
-
-
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 theLocationAwareLoggerwill be used to log the givenmessage.- Overrides:
logMessagein classNullTracer- Parameters:
logLevel- will be converted to an appropriate Logback levelmessage- the to be logged messageclazz- the originating classmethodName- 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 theLocationAwareLoggerwill be used to log the giventhrowable.- Overrides:
logExceptionin classNullTracer- Parameters:
logLevel- will be converted to an appropriate Logback levelthrowable- the to be logged throwableclazz- the originating classmethodName- the name of the relevant method
-
readConfiguration
protected void readConfiguration(XPath xpath, Node node)
Description copied from class:NullTracerPseudo readConfiguration()-method.- Overrides:
readConfigurationin classNullTracer- Parameters:
xpath- (ignored)node- (ignored)
-
-