Class LoggersEndpoint
java.lang.Object
io.micronaut.management.endpoint.loggers.LoggersEndpoint
@Endpoint(id="loggers",
defaultSensitive=false,
defaultEnabled=false)
public class LoggersEndpoint
extends Object
Exposes an
Endpoint
to manage loggers.- Since:
- 1.0
- Author:
- Matthew Moss
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLoggersEndpoint
(ManagedLoggingSystem loggingSystem, LoggersManager<Map<String, Object>> loggersManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
loggers()
void
setLogLevel
(@NotBlank String name, LogLevel configuredLevel) void
setWriteSensitive
(boolean writeSensitive) Determines whether modifications to the log level should require authentication.
-
Field Details
-
NAME
Endpoint name.- See Also:
-
PREFIX
Endpoint configuration prefix.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDEndpoint default enabled.- See Also:
-
DEFAULT_SENSITIVE
public static final boolean DEFAULT_SENSITIVEEndpoint default sensitivity.- See Also:
-
-
Constructor Details
-
LoggersEndpoint
public LoggersEndpoint(ManagedLoggingSystem loggingSystem, LoggersManager<Map<String, Object>> loggersManager) - Parameters:
loggingSystem
- theLoggingSystem
loggersManager
- theLoggersManager
-
-
Method Details
-
loggers
- Returns:
- the loggers as a
Mono
-
logger
@Read @SingleResult public Publisher<Map<String,Object>> logger(@NotBlank @Selector @NotBlank String name) - Parameters:
name
- The name of the logger to find- Returns:
- the
LogLevel
(both configured and effective) of the named logger
-
setLogLevel
@Write @Sensitive(property="write-sensitive") public void setLogLevel(@NotBlank @Selector @NotBlank String name, @Nullable LogLevel configuredLevel) - Parameters:
name
- The name of the logger to configureconfiguredLevel
- TheLogLevel
to set on the named logger
-
isWriteSensitive
public boolean isWriteSensitive()- Returns:
- True if modifications require authentication
-
setWriteSensitive
public void setWriteSensitive(boolean writeSensitive) Determines whether modifications to the log level should require authentication. Default value (true).- Parameters:
writeSensitive
- The write sensitivity option.
-