tracerSupplier.getTracer(t.getName().isEmpty() ? n : t.getName() + "." + n);
public interface Tracer extends Tracer
Rhino extensions to the SLEE-defined Tracer interface.
Modifier and Type | Method and Description |
---|---|
Tracer |
getChildTracer(String name)
Get a child tracer of this tracer with the specified name.
|
Tracer |
getParentTracer()
Get this tracer’s parent tracer.
|
config, config, fine, fine, finer, finer, finest, finest, getParentTracerName, getTraceLevel, getTracerName, info, info, isConfigEnabled, isFineEnabled, isFinerEnabled, isFinestEnabled, isInfoEnabled, isSevereEnabled, isTraceable, isWarningEnabled, severe, severe, trace, trace, warning, warning
Tracer getParentTracer()
Get this tracer’s parent tracer.
The parent tracer is the tracer with the name returned by Tracer.getParentTracerName()
. This method returns null
from a root tracer as a root tracer has no parent.
This method is a non-transactional method.
null
if this tracer is a root tracer.Tracer getChildTracer(String name) throws NullPointerException, IllegalArgumentException, FacilityException
Get a child tracer of this tracer with the specified name.
Given a tracer t and child tracer name n, this method is functionally equivalent to:
tracerSupplier.getTracer(t.getName().isEmpty() ? n : t.getName() + "." + n);
where tracerSupplier is the SLEE object that originally produced the tracer t, such as an SbbContext
or ProfileContext
.
This method can be used to create any tracer that is a descendant of t. For example:
Tracer c = t.getChildTracer("foo.bar");
produces a tracer that is a grandchild of t such that c.getParentTracer().getParentTracerName().equals(t.getTracerName())
holds true.
This method is a non-transactional method.
name
- the name of the child tracer.NullPointerException
- if name
is null
.IllegalArgumentException
- if name
is zero length or would result in an invalid tracer name.
Name components within a tracer name must have at least one character.
For example, "com.mycompany"
is a valid tracer name, whereas "com..mycompany"
is not.FacilityException
- if the Tracer could not be obtained due to a system-level failure.