Package de.christofreichardt.diagnosis
Class JDKLoggingRouter
- java.lang.Object
-
- de.christofreichardt.diagnosis.AbstractTracer
-
- de.christofreichardt.diagnosis.NullTracer
-
- de.christofreichardt.diagnosis.JDKLoggingRouter
-
public final class JDKLoggingRouter extends NullTracer
This specialisedNullTracerredirects log messages to the core logging facilities of the Java platform, see java.util.logging. TheLogLevels will be translated into theLevels used by loggers of the Java platform. All of the other tracing output will be discarded.- 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 JDKLoggingRouter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LevelconvertToJDK14Level(LogLevel logLevel)voidlogException(LogLevel logLevel, Throwable throwable, Class<?> clazz, String methodName)Calls theLoggerfor the given clazz.voidlogMessage(LogLevel logLevel, String message, Class<?> clazz, String methodName)Calls theLoggerfor the given clazz.-
Methods inherited from class de.christofreichardt.diagnosis.NullTracer
close, entry, entry, entry, initCurrentTracingContext, initCurrentTracingContext, open, out, out, readConfiguration, 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)
Calls theLoggerfor the given clazz.- Overrides:
logMessagein classNullTracer- Parameters:
logLevel- the log levelmessage- the to be logged messageclazz- the originating classmethodName- the originating method
-
logException
public void logException(LogLevel logLevel, Throwable throwable, Class<?> clazz, String methodName)
Calls theLoggerfor the given clazz.- Overrides:
logExceptionin classNullTracer- Parameters:
logLevel- the log levelthrowable- the to be logged throwableclazz- the originating classmethodName- the name of the relevant method
-
-