Class RecursionDepth

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public final class RecursionDepth
    extends Object
    implements Closeable
    A threal local counter, incremented whenever a log statement is being processed by the backend. If this value is greater than 1, then reentrant logging has occured, and some code may behave differently to try and avoid issues such as unbounded recursion. Logging may even be disabled completely if the depth gets too high.

    This class is an internal detail and must not be used outside the core Flogger library. Backends which need to know the recursion depth for any reason should call Platform.getCurrentRecursionDepth().

    • Constructor Detail

      • RecursionDepth

        public RecursionDepth()
    • Method Detail

      • getCurrentDepth

        public static int getCurrentDepth()
        Do not call this method directly, use Platform.getCurrentRecursionDepth().
      • getValue

        public int getValue()
        Do not call this method directly, use Platform.getCurrentRecursionDepth().
      • enterLogStatement

        public static RecursionDepth enterLogStatement()
        Internal API for use by core Flogger library.