Package de.christofreichardt.diagnosis
Class NullTracer
java.lang.Object
de.christofreichardt.diagnosis.AbstractTracer
de.christofreichardt.diagnosis.NullTracer
- Direct Known Subclasses:
JDKLoggingRouter,Log4j2Router,LogbackRouter
Instances of this tracer type don't trace anything and therefore need not to manage any method stacks. This fast tracer may be used
at production time. Derived classes should be made final and may override the logException()- and logMessage()-methods by connecting to an
alternative logging system.
- 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
ConstructorsConstructorDescriptionDefault constructor.NullTracer(String name) Constructor for pooled tracers with (unique) names. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()Pseudo close()-method.final TraceMethodDeprecated.provided for backwards compatibilityfinal TraceMethodPseudo entry()-method.final TraceMethodPseudo entry()-method.final voidPseudo initCurrentTracingContext()-method.final voidinitCurrentTracingContext(int debugLevel, boolean online) Pseudo initCurrentTracingContext()-method.voidlogException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName) Pseudo logException()-method.voidlogMessage(LogLevel logLevel, String message, Class clazz, String methodName) Pseudo logMessage()-method.final voidopen()Pseudo open()-method.final NullPrintStreamout()Returns always aNullPrintStream.protected final NullPrintStreamout(int level) Returns always aNullPrintStreamregardless of the given level.protected voidreadConfiguration(XPath xpath, Node node) Pseudo readConfiguration()-method.final TraceMethodwayout()Pseudo wayout()-method.Methods 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
-
NullTracer
public NullTracer()Default constructor. -
NullTracer
Constructor for pooled tracers with (unique) names.- Parameters:
name- the name of the tracer
-
-
Method Details
-
readConfiguration
Pseudo readConfiguration()-method.- Overrides:
readConfigurationin classAbstractTracer- Parameters:
xpath- (ignored)node- (ignored)
-
open
public final void open()Pseudo open()-method.- Specified by:
openin classAbstractTracer
-
close
public final void close()Pseudo close()-method.- Specified by:
closein classAbstractTracer
-
out
Returns always aNullPrintStreamregardless of the given level.- Overrides:
outin classAbstractTracer- Parameters:
level- (ignored)- Returns:
- always a NullPrintStream
-
out
Returns always aNullPrintStream.- Overrides:
outin classAbstractTracer- Returns:
- a NullPrintStream
-
entry
Deprecated.provided for backwards compatibilityPseudo entry()-method.- Overrides:
entryin classAbstractTracer- Parameters:
methodSignature- (ignored)- Returns:
- always null
-
entry
Pseudo entry()-method.- Overrides:
entryin classAbstractTracer- Parameters:
returnType- (ignored)object- (ignored)methodSignature- (ignored)- Returns:
- always null
-
entry
Pseudo entry()-method.- Overrides:
entryin classAbstractTracer- Parameters:
returnType- (ignored)clazz- (ignored)methodSignature- (ignored)- Returns:
- always null
-
wayout
Pseudo wayout()-method.- Overrides:
wayoutin classAbstractTracer- Returns:
- always null
-
initCurrentTracingContext
public final void initCurrentTracingContext()Pseudo initCurrentTracingContext()-method.- Overrides:
initCurrentTracingContextin classAbstractTracer
-
initCurrentTracingContext
public final void initCurrentTracingContext(int debugLevel, boolean online) Pseudo initCurrentTracingContext()-method.- Overrides:
initCurrentTracingContextin classAbstractTracer- Parameters:
debugLevel- (ignored)online- (ignored)
-
logException
Pseudo logException()-method. Derived classes should provide code which connects to an alternative logging system.- Overrides:
logExceptionin classAbstractTracer- Parameters:
logLevel- (ignored)throwable- (ignored)clazz- (ignored)methodName- the name of the relevant method
-
logMessage
Pseudo logMessage()-method. Derived classes should provide code which connects to an alternative logging system.- Overrides:
logMessagein classAbstractTracer- Parameters:
logLevel- (ignored)message- (ignored)clazz- (ignored)methodName- the originating method
-