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 Details

  • Constructor Details

    • AccessLogger

      public AccessLogger()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.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

      public String getLoggerName()
      Returns:
      The name of the logger the access log is written to
    • setLoggerName

      public void setLoggerName(String loggerName)
      Sets the logger name. Default value ("HTTP_ACCESS_LOGGER").
      Parameters:
      loggerName - The logger name
    • getExclusions

      public List<String> getExclusions()
      Returns:
      Regular expressions matched against the request path; matching requests are not logged
    • setExclusions

      public void setExclusions(List<String> exclusions)
      Sets the paths to exclude from the log, as regular expressions matched against the request path.
      Parameters:
      exclusions - The exclusion patterns