public interface LoggingProvider
Modifier and Type | Method and Description |
---|---|
ContextProvider |
getContextProvider()
Returns the corresponding context provider.
|
Level |
getMinimumLevel()
Gets the lowest activated severity level for all tags.
|
Level |
getMinimumLevel(String tag)
Gets the lowest activated severity level for a tag.
|
boolean |
isEnabled(int depth,
String tag,
Level level)
Checks whether log entries with given tag and severity level will be output.
|
boolean |
isEnabled(String loggerClassName,
String tag,
Level level)
Checks whether log entries, issued by the caller of the given logger class, with given tag and severity level will be output.
|
void |
log(int depth,
String tag,
Level level,
Throwable exception,
MessageFormatter formatter,
Object obj,
Object... arguments)
Provides a regular log entry.
|
void |
log(String loggerClassName,
String tag,
Level level,
Throwable exception,
MessageFormatter formatter,
Object obj,
Object... arguments)
Provides a regular log entry.
|
void |
shutdown()
Shuts down the logging provider and frees all allocated resources.
|
ContextProvider getContextProvider()
Level getMinimumLevel()
The result of this method is cacheable and can be used to stop processing log entries at an early stage, before doing any expensive operations. All lower severity levels than the returned level will be never output. But it is not guaranteed the returned severity level or higher will be really output (for example if output depends on package or class name).
Level getMinimumLevel(String tag)
The result of this method is cacheable and can be used to stop processing log entries at an early stage, before doing any expensive operations. All lower severity levels than the returned level will be never output. But it is not guaranteed the returned severity level or higher will be really output (for example if output depends on package or class name).
tag
- Tag to check (can be null
)boolean isEnabled(int depth, String tag, Level level)
depth
- Depth of caller in stack trace (e.g. '1' if there is only one method between caller and this method in
the stack trace)tag
- Tag to check (can be null
)level
- Severity level to checktrue
if given severity level is enabled, false
if disabledboolean isEnabled(String loggerClassName, String tag, Level level)
loggerClassName
- Fully-qualified class name of the logger instancetag
- Tag to check (can be null
)level
- Severity level to checktrue
if given severity level is enabled, false
if disabledvoid log(int depth, String tag, Level level, Throwable exception, MessageFormatter formatter, Object obj, Object... arguments)
depth
- Depth of caller in stack trace (e.g. '1' if there is only one method between caller and this method in
the stack trace)tag
- Tag of log entry or null
if untaggedlevel
- Severity level of log entryexception
- Exception to log or null
formatter
- Formatter for text message, only required if there are any arguments to insertobj
- Message to log or null
arguments
- Arguments for message or null
void log(String loggerClassName, String tag, Level level, Throwable exception, MessageFormatter formatter, Object obj, Object... arguments)
loggerClassName
- Fully-qualified class name of the logger instancetag
- Tag of log entry or null
if untaggedlevel
- Severity level of log entryexception
- Exception to log or null
formatter
- Formatter for text message, only required if there are any arguments to insertobj
- Message to log or null
arguments
- Arguments for message or null
void shutdown() throws InterruptedException
InterruptedException
- Interrupted while waiting for complete shutdownCopyright © 2024. All rights reserved.