@Singleton @Requires(beans=LoggersEndpoint.class) @Requires(classes=ch.qos.logback.classic.LoggerContext.class) @Replaces(value=LogbackLoggingSystem.class) public class LogbackLoggingSystem extends Object implements ManagedLoggingSystem, LoggingSystem
ManagedLoggingSystem
that works with logback.Constructor and Description |
---|
LogbackLoggingSystem()
Deprecated.
Use
LogbackLoggingSystem(String) instead. |
LogbackLoggingSystem(String logbackXmlLocation) |
Modifier and Type | Method and Description |
---|---|
LoggerConfiguration |
getLogger(String name)
Returns a
LoggerConfiguration for the logger found by name (or created if not found). |
Collection<LoggerConfiguration> |
getLoggers()
Returns all existing loggers.
|
void |
refresh()
Refreshes Logging System with the goal of cleaning its internal caches.
|
void |
setLogLevel(String name,
LogLevel level)
Set the log level for the logger found by name (or created if not found).
|
@Deprecated public LogbackLoggingSystem()
LogbackLoggingSystem(String)
instead.@NonNull public Collection<LoggerConfiguration> getLoggers()
ManagedLoggingSystem
getLoggers
in interface ManagedLoggingSystem
Collection
of LoggerConfiguration
instances for all existing loggers@NonNull public LoggerConfiguration getLogger(String name)
ManagedLoggingSystem
LoggerConfiguration
for the logger found by name (or created if not found).getLogger
in interface ManagedLoggingSystem
name
- the logger namepublic void setLogLevel(String name, LogLevel level)
LoggingSystem
setLogLevel
in interface LoggingSystem
name
- the logger namelevel
- the log level to set on the named loggerpublic void refresh()
LoggingSystem
refresh
in interface LoggingSystem