Package de.christofreichardt.diagnosis
Class JDKLoggingRouter
java.lang.Object
de.christofreichardt.diagnosis.AbstractTracer
de.christofreichardt.diagnosis.NullTracer
de.christofreichardt.diagnosis.JDKLoggingRouter
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
-
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, wayoutMethods inherited from class de.christofreichardt.diagnosis.AbstractTracer
clearCurrentTracingContext, formatStreamErrorState, formatVersionInfo, getBufferedOutputStream, getBufferSize, getName, getNullPrintStream, getSyncObject, getThreadMap, getTracePrintStream, isAutoflush, isOpened, setAutoflush, setBufferedOutputStream, setBufferSize, setOpened, setTracePrintStream, substitute
-
Constructor Details
-
JDKLoggingRouter
public JDKLoggingRouter()
-
-
Method Details
-
convertToJDK14Level
-
logMessage
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
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
-