Class ActiveTraceImpl

java.lang.Object
de.codecamp.tracer.impl.ActiveTraceImpl
All Implemented Interfaces:
ActiveTrace, AutoCloseable

public class ActiveTraceImpl extends Object implements ActiveTrace
  • Constructor Details

    • ActiveTraceImpl

      public ActiveTraceImpl(Trace trace, TracerImpl tracer)
  • Method Details

    • startSubTrace

      public ActiveTrace startSubTrace(String label, Object... labelFormatArgs)
      Description copied from interface: ActiveTrace
      Starts and returns a new sub-trace which will be the new active trace. It's generally recommended to call this method in a try-with-resource.
      Specified by:
      startSubTrace in interface ActiveTrace
      Parameters:
      label - the label to use for this trace; may contain placeholders
      labelFormatArgs - the format arguments for the placeholders in the label
      Returns:
      the new active sub-trace
    • end

      public void end()
      Description copied from interface: ActiveTrace
      Ends this trace and all sub-traces.
      Specified by:
      end in interface ActiveTrace