Class JdkHttpServerConfiguration.AccessLogger
java.lang.Object
io.micronaut.servlet.http.server.jdk.JdkHttpServerConfiguration.AccessLogger
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Enclosing class:
JdkHttpServerConfiguration
@ConfigurationProperties("access-logger")
public static class JdkHttpServerConfiguration.AccessLogger
extends Object
implements io.micronaut.core.util.Toggleable
Access log configuration for the built-in server, named as the Netty server's
micronaut.server.netty.access-logger. Each request is logged in the common log format to the
configured logger once its response has been sent.- Since:
- 6.2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetEnabled(boolean enabled) Enables the access log.voidsetExclusions(List<String> exclusions) Sets the paths to exclude from the log, as regular expressions matched against the request path.voidsetLoggerName(String loggerName) Sets the logger name.
-
Field Details
-
DEFAULT_LOGGER_NAME
-
-
Constructor Details
-
AccessLogger
public AccessLogger()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Enables the access log. Default value (false).- Parameters:
enabled- Whether the access log is enabled
-
getLoggerName
- Returns:
- The name of the logger the access log is written to
-
setLoggerName
Sets the logger name. Default value ("HTTP_ACCESS_LOGGER").- Parameters:
loggerName- The logger name
-
getExclusions
-
setExclusions
-