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
-
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.void
setLogLevel
(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:LoggersManager
Collect all existing loggers in the system.- Specified by:
getLoggers
in interfaceLoggersManager<Map<String,
Object>> - Parameters:
loggingSystem
- TheManagedLoggingSystem
in use- Returns:
- A
Publisher
ofT
-
getLogger
Description copied from interface:LoggersManager
Find (or create if not found) the named logger in the system.- Specified by:
getLogger
in interfaceLoggersManager<Map<String,
Object>> - Parameters:
loggingSystem
- TheManagedLoggingSystem
in usename
- The name of the logger to find or create- Returns:
- A
Publisher
ofT
-
setLogLevel
public void setLogLevel(ManagedLoggingSystem loggingSystem, @NotBlank @NotBlank String name, @NotNull LogLevel level) Description copied from interface:LoggersManager
Set the log level for the named logger in the system.- Specified by:
setLogLevel
in interfaceLoggersManager<Map<String,
Object>> - Parameters:
loggingSystem
- TheManagedLoggingSystem
in usename
- The name of the logger to find or createlevel
- The log level to configure
-