LoggingScopeProvider

public interface LoggingScopeProvider

Provides a scope to a log statement via the per method.

This interface exists to avoid needing to pass specific instances of LoggingScope around in user code. The scope provider can lookup the correct scope instance for the current thread, and different providers can provide different types of scope (e.g. you can have a provider for "request" scopes and a provider for "sub-task" scopes)

See also

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

Original Java code of Google Flogger

Inheritors

Functions

Link copied to clipboard
@Nullable()
public abstract @Nullable() LoggingScope getCurrentScope()
Returns the current scope (most likely via global or thread local state) or null if there is no current scope.