ScopedLoggingContexts

public final class ScopedLoggingContexts

Static methods equivalent to the instance methods on ScopedLoggingContext but which always operate on the current ScopedLoggingContext that would be returned by getInstance.

See also

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

Original Java code of Google Flogger

Functions

Link copied to clipboard
@CanIgnoreReturnValue()
public static boolean addMetadata<T>(FloggerMetadataKey<T> key, T value)
Adds a single metadata key/value pair to the current context.
Link copied to clipboard
@CanIgnoreReturnValue()
public static boolean addTags(Tags tags)
Adds tags by modifying the current context (if one exists).
Link copied to clipboard
@CanIgnoreReturnValue()
public static boolean applyLogLevelMap(LogLevelMap logLevelMap)
Applies the given log level map to the current context.
Link copied to clipboard
Creates a new ScopedLoggingContext.Builder to which additional logging metadata can be attached before being installed or used to wrap some existing code.