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.

Functions

Link copied to clipboard
@CanIgnoreReturnValue()
public static boolean addMetadata<T>(MetadataKey<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.