Class DefaultLoggersManager
java.lang.Object
io.micronaut.management.endpoint.loggers.impl.DefaultLoggersManager
- All Implemented Interfaces:
LoggersManager<Map<String,Object>>
@Singleton
@Requires(beans=LoggersEndpoint.class)
public class DefaultLoggersManager
extends Object
implements LoggersManager<Map<String,Object>>
Default implementation of
LoggersManager.- Since:
- 1.0
- Author:
- Matthew Moss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLogger(ManagedLoggingSystem loggingSystem, String name) Find (or create if not found) the named logger in the system.getLoggers(ManagedLoggingSystem loggingSystem) Collect all existing loggers in the system.voidsetLogLevel(ManagedLoggingSystem loggingSystem, @NotBlank String name, LogLevel level) Set the log level for the named logger in the system.
-
Constructor Details
-
DefaultLoggersManager
public DefaultLoggersManager()
-
-
Method Details
-
getLoggers
Description copied from interface:LoggersManagerCollect all existing loggers in the system.- Specified by:
getLoggersin interfaceLoggersManager<Map<String,Object>> - Parameters:
loggingSystem- TheManagedLoggingSystemin use- Returns:
- A
PublisherofT
-
getLogger
Description copied from interface:LoggersManagerFind (or create if not found) the named logger in the system.- Specified by:
getLoggerin interfaceLoggersManager<Map<String,Object>> - Parameters:
loggingSystem- TheManagedLoggingSystemin usename- The name of the logger to find or create- Returns:
- A
PublisherofT
-
setLogLevel
public void setLogLevel(ManagedLoggingSystem loggingSystem, @NotBlank @NotBlank String name, @NotNull LogLevel level) Description copied from interface:LoggersManagerSet the log level for the named logger in the system.- Specified by:
setLogLevelin interfaceLoggersManager<Map<String,Object>> - Parameters:
loggingSystem- TheManagedLoggingSystemin usename- The name of the logger to find or createlevel- The log level to configure
-