- java.lang.Object
-
- de.codecamp.tracer.AbstractTraceHandler
-
- de.codecamp.tracer.handlers.Slf4jLoggingTraceHandler
-
- All Implemented Interfaces:
TraceHandler
public class Slf4jLoggingTraceHandler extends AbstractTraceHandler
ATraceHandlerlogging with SLF4J.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMARKER_NAMEthe name of themarkerused when logging the profiler session
-
Constructor Summary
Constructors Constructor Description Slf4jLoggingTraceHandler()Slf4jLoggingTraceHandler(String loggerName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(Trace trace)Handles the given fully completed trace.voidsetFormatter(TraceFormatter formatter)Sets the formatter used when logging.-
Methods inherited from class de.codecamp.tracer.AbstractTraceHandler
containsWarnings, traceHierarchyStream
-
-
-
-
Field Detail
-
MARKER_NAME
public static final String MARKER_NAME
the name of themarkerused when logging the profiler session- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Slf4jLoggingTraceHandler
public Slf4jLoggingTraceHandler()
-
Slf4jLoggingTraceHandler
public Slf4jLoggingTraceHandler(String loggerName)
-
-
Method Detail
-
setFormatter
public void setFormatter(TraceFormatter formatter)
Sets the formatter used when logging. Only relevant on the root session.- Parameters:
formatter- the formatter
-
handle
public void handle(Trace trace)
Description copied from interface:TraceHandlerHandles the given fully completed trace.- Parameters:
trace- the fully completed trace (a root trace of a root context)
-
-