Package com.enonic.xp.trace

## Class Tracer

- java.lang.Object
- - com.enonic.xp.trace.Tracer

-     public final class Tracer
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Trace` | `current()` |
    `static boolean` | `isEnabled()` |
    `static Trace` | `newTrace​(String name)` |
    `static void` | `setManager​(TraceManager manager)` |
    `static <T> T` | `trace​(Trace trace, TraceRunnable<T> runnable)` |
    `static void` | `trace​(Trace trace, Runnable runnable)` |
    `static <T> T` | `trace​(String name, TraceRunnable<T> runnable)` |
    `static void` | `trace​(String name, Runnable runnable)` |
    `static <T> T` | `trace​(String name, Consumer<Trace> before, Runnable main)` |
    `static <T> T` | `trace​(String name, Consumer<Trace> before, Supplier<T> main)` |
    `static <T> T` | `trace​(String name, Consumer<Trace> before, Supplier<T> main, BiConsumer<Trace,​T> after)` |
    `static <T> T` | `traceEx​(Trace trace, Callable<T> callable)` |
    `static <T> T` | `traceEx​(String name, Callable<T> callable)` |
    `static void` | `withCurrent​(Consumer<Trace> consumer)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isEnabled

          public static boolean isEnabled()

    - #### current

          public static Trace current()

    - #### withCurrent

          public static void withCurrent​(Consumer<Trace> consumer)

    - #### trace

          public static void trace​(Trace trace,
                                   Runnable runnable)

    - #### trace

          public static <T> T trace​(Trace trace,
                                    TraceRunnable<T> runnable)

    - #### traceEx

          public static <T> T traceEx​(Trace trace,
                                      Callable<T> callable)
                               throws Exception

      Throws:
        `Exception`

    - #### newTrace

          public static Trace newTrace​(String name)

    - #### trace

          public static void trace​(String name,
                                   Runnable runnable)

    - #### trace

          public static <T> T trace​(String name,
                                    TraceRunnable<T> runnable)

    - #### trace

          public static <T> T trace​(String name,
                                    Consumer<Trace> before,
                                    Supplier<T> main,
                                    BiConsumer<Trace,​T> after)

    - #### trace

          public static <T> T trace​(String name,
                                    Consumer<Trace> before,
                                    Supplier<T> main)

    - #### trace

          public static <T> T trace​(String name,
                                    Consumer<Trace> before,
                                    Runnable main)

    - #### traceEx

          public static <T> T traceEx​(String name,
                                      Callable<T> callable)
                               throws Exception

      Throws:
        `Exception`

    - #### setManager

          public static void setManager​(TraceManager manager)