Class NettyHttpServerConfiguration.AccessLogger
java.lang.Object
io.micronaut.http.server.netty.configuration.NettyHttpServerConfiguration.AccessLogger
- Enclosing class:
- NettyHttpServerConfiguration
@ConfigurationProperties("access-logger")
public static class NettyHttpServerConfiguration.AccessLogger
extends Object
Access logger configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the log format to use.The logger name to use.booleanReturns whether the access logger is enabled.voidsetEnabled(boolean enabled) Enables or Disables the access logger.voidsetExclusions(List<String> exclusions) Sets the URI patterns to be excluded from the access log.voidsetLogFormat(String logFormat) Sets the log format to use.voidsetLoggerName(String loggerName) Sets the logger name to use.
-
Constructor Details
-
AccessLogger
public AccessLogger()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether the access logger is enabled.- Returns:
- Whether the access logger is enabled.
-
setEnabled
public void setEnabled(boolean enabled) Enables or Disables the access logger.- Parameters:
enabled- The flag.
-
getLoggerName
The logger name to use. Access logs will be logged at info level.- Returns:
- The logger name.
-
setLoggerName
Sets the logger name to use. If not specified 'HTTP_ACCESS_LOGGER' will be used.- Parameters:
loggerName- A logger name,
-
getLogFormat
Returns the log format to use.- Returns:
- The log format.
-
setLogFormat
Sets the log format to use. When not specified, the Common Log Format (CLF) will be used.- Parameters:
logFormat- The log format.
-
getExclusions
- Returns:
- The URI patterns to exclude from the access log.
-
setExclusions
Sets the URI patterns to be excluded from the access log.- Parameters:
exclusions- A list of regular expression patterns to be excluded from the access logger if the request URI matches.- See Also:
-