RecursionDepth

public final class RecursionDepth 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().

See also

<a href="https://github.com/google/flogger/blob/cb9e836a897d36a78309ee8badf5cad4e6a2d3d8/api/src/main/java/com/google/common/flogger/util/RecursionDepth.java">

Original Java code of Google Flogger

Constructors

Link copied to clipboard
public void RecursionDepth()

Properties

Link copied to clipboard
public int value

Functions

Link copied to clipboard
public void close()
Link copied to clipboard
Internal API for use by core Flogger library.
Link copied to clipboard
public static int getCurrentDepth()
Do not call this method directly, use Platform.getCurrentRecursionDepth().
Link copied to clipboard
public int getValue()
Do not call this method directly, use Platform.getCurrentRecursionDepth().