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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aLoggerConfigurationfor the logger found by name (or created if not found).Returns all existing loggers.voidrefresh()Refreshes Logging System with the goal of cleaning its internal caches.voidsetLogLevel(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:ManagedLoggingSystemReturns all existing loggers.- Specified by:
getLoggersin interfaceManagedLoggingSystem- Returns:
- A
CollectionofLoggerConfigurationinstances for all existing loggers
-
getLogger
Description copied from interface:ManagedLoggingSystemReturns aLoggerConfigurationfor the logger found by name (or created if not found).- Specified by:
getLoggerin interfaceManagedLoggingSystem- Parameters:
name- the logger name- Returns:
- the logger configuration
-
setLogLevel
Description copied from interface:LoggingSystemSet the log level for the logger found by name (or created if not found).- Specified by:
setLogLevelin interfaceLoggingSystem- Parameters:
name- the logger namelevel- the log level to set on the named logger
-
refresh
public void refresh()Description copied from interface:LoggingSystemRefreshes Logging System with the goal of cleaning its internal caches.- Specified by:
refreshin interfaceLoggingSystem
-