|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.tracing.Slf4jTracer
public class Slf4jTracer
A Tracer implementation that used Logger
as tracing sink.
See Logger.entering(String, String) for an
example of the format and semantic used.
TODO: Need Marker for classname & methodname? How?
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jcoderz.commons.tracing.Tracer |
|---|
Tracer.TracingToken |
| Method Summary | |
|---|---|
Tracer.TracingToken |
entering(String className,
String methodName)
Delegates to {@link Logger#trace(org.slf4j.Marker, String). |
Tracer.TracingToken |
entering(String className,
String methodName,
Object argument)
Delegates to Logger.trace(String, Object). |
Tracer.TracingToken |
entering(String className,
String methodName,
Object[] arguments)
Delegates to Logger#trace(String, String, Object). |
void |
exiting(Tracer.TracingToken token)
Delegates to Logger.trace(String, Object) the message
string used is "RETURN". |
void |
exiting(Tracer.TracingToken token,
Object result)
Delegates to Logger.trace(String, Object). |
String |
getClassName()
Returns the Name of the class where this tracer belongs to. |
static Slf4jTracer |
getTracer(String className)
Factory for a tracer for classes with the given name. |
boolean |
isTracing()
Returns true, if the level of the underlying slf4j logger has trace enabled. |
boolean |
isTracingArguments()
Returns always true. |
void |
throwing(Tracer.TracingToken token,
Throwable thrown)
Delegates to Logger#throwing(String, String, Throwable). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Slf4jTracer getTracer(String className)
className - the name of the class that uses this tracer.
public boolean isTracing()
isTracing in interface TracerLogger.isTraceEnabled()public boolean isTracingArguments()
isTracingArguments in interface TracerTracer.isTracingArguments()public String getClassName()
public Tracer.TracingToken entering(String className,
String methodName)
entering in interface TracerclassName - name of the classmethodName - name of the method entered.
Tracer.entering(java.lang.String, java.lang.String)
public Tracer.TracingToken entering(String className,
String methodName,
Object argument)
Logger.trace(String, Object).
The className is expected to be the same as the tracer name and
is silently ignored.
entering in interface TracerTracer.entering(String, String, Object)
public Tracer.TracingToken entering(String className,
String methodName,
Object[] arguments)
Logger#trace(String, String, Object).
The className is expected to be the same as the tracer name and
is silently ignored.
entering in interface TracerTracer.entering(String, String, Object[])public void exiting(Tracer.TracingToken token)
Logger.trace(String, Object) the message
string used is "RETURN".
If the token is not a Slf4jTracingToken the call is
silently ignored.
exiting in interface TracerTracer.exiting(TracingToken)
public void exiting(Tracer.TracingToken token,
Object result)
Logger.trace(String, Object).
If the token is not a Slf4jTracingToken the call is
silently ignored.
exiting in interface TracerTracer.exiting(TracingToken, java.lang.Object)
public void throwing(Tracer.TracingToken token,
Throwable thrown)
Logger#throwing(String, String, Throwable).
If the token is not a Slf4jTracingToken the call is
silently ignored.
throwing in interface TracerTracer.throwing(TracingToken, java.lang.Throwable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||