Class NettyHttpServerConfiguration.AccessLogger

  • Enclosing class:
    NettyHttpServerConfiguration

    @ConfigurationProperties("access-logger")
    public static class NettyHttpServerConfiguration.AccessLogger
    extends java.lang.Object
    Access logger configuration.
    • Constructor Summary

      Constructors 
      Constructor Description
      AccessLogger()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getExclusions()  
      java.lang.String getLogFormat()
      Returns the log format to use.
      java.lang.String getLoggerName()
      The logger name to use.
      boolean isEnabled()
      Returns whether the access logger is enabled.
      void setEnabled​(boolean enabled)
      Enables or Disables the access logger.
      void setExclusions​(java.util.List<java.lang.String> exclusions)
      Sets the URI patterns to be excluded from the access log.
      void setLogFormat​(java.lang.String logFormat)
      Sets the log format to use.
      void setLoggerName​(java.lang.String loggerName)
      Sets the logger name to use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AccessLogger

        public AccessLogger()
    • Method Detail

      • 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

        public java.lang.String getLoggerName()
        The logger name to use. Access logs will be logged at info level.
        Returns:
        The logger name.
      • setLoggerName

        public void setLoggerName​(java.lang.String loggerName)
        Sets the logger name to use. If not specified 'HTTP_ACCESS_LOGGER' will be used.
        Parameters:
        loggerName - A logger name,
      • getLogFormat

        public java.lang.String getLogFormat()
        Returns the log format to use.
        Returns:
        The log format.
      • setLogFormat

        public void setLogFormat​(java.lang.String logFormat)
        Sets the log format to use. When not specified, the Common Log Format (CLF) will be used.
        Parameters:
        logFormat - The log format.
      • getExclusions

        public java.util.List<java.lang.String> getExclusions()
        Returns:
        The URI patterns to exclude from the access log.
      • setExclusions

        public void setExclusions​(java.util.List<java.lang.String> exclusions)
        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:
        Pattern.compile(String)