Class LogbackLoggingSystem
java.lang.Object
io.micronaut.management.endpoint.loggers.impl.LogbackLoggingSystem
- All Implemented Interfaces:
LoggingSystem
,ManagedLoggingSystem
@Singleton
@Requires(beans=LoggersEndpoint.class) @Requires(classes=ch.qos.logback.classic.LoggerContext.class)
@Replaces(LogbackLoggingSystem.class)
public class LogbackLoggingSystem
extends Object
implements ManagedLoggingSystem, LoggingSystem
An implementation of
ManagedLoggingSystem
that works with logback.- Since:
- 1.0
- Author:
- Matthew Moss
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns aLoggerConfiguration
for the logger found by name (or created if not found).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).
-
Constructor Details
-
LogbackLoggingSystem
-
-
Method Details
-
getLoggers
Description copied from interface:ManagedLoggingSystem
Returns all existing loggers.- Specified by:
getLoggers
in interfaceManagedLoggingSystem
- Returns:
- A
Collection
ofLoggerConfiguration
instances for all existing loggers
-
getLogger
Description copied from interface:ManagedLoggingSystem
Returns aLoggerConfiguration
for the logger found by name (or created if not found).- Specified by:
getLogger
in interfaceManagedLoggingSystem
- Parameters:
name
- the logger name- Returns:
- the logger configuration
-
setLogLevel
Description copied from interface:LoggingSystem
Set the log level for the logger found by name (or created if not found).- Specified by:
setLogLevel
in interfaceLoggingSystem
- Parameters:
name
- the logger namelevel
- the log level to set on the named logger
-
refresh
public void refresh()Description copied from interface:LoggingSystem
Refreshes Logging System with the goal of cleaning its internal caches.- Specified by:
refresh
in interfaceLoggingSystem
-