Package io.spine.logging.flogger
Interface LoggingScopeProvider
-
- All Known Implementing Classes:
ScopeType
public interface LoggingScopeProviderProvides a scope to a log statement via theLogContext.per(LoggingScopeProvider)method.This interface exists to avoid needing to pass specific instances of
LoggingScopearound 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:
- Original Java code of Google Flogger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable LoggingScopegetCurrentScope()Returns the current scope (most likely via global or thread local state) ornullif there is no current scope.
-
-
-
Method Detail
-
getCurrentScope
@Nullable LoggingScope getCurrentScope()
Returns the current scope (most likely via global or thread local state) ornullif there is no current scope.
-
-