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.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the log format to use.@Nullable StringThe 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
-
setLogFormat
Sets the log format to use. When not specified, the Common Log Format (CLF) will be used.- Parameters:
logFormat- The log format.
-
getExclusions
-
setExclusions
-