类 HttpLogging


  • public abstract class HttpLogging
    extends Object
    Holds the shared logger named "org.springframework.web.HttpLogging" for HTTP related logging when "org.springframework.http" is not enabled but "org.springframework.web" is.

    That means "org.springframework.web" enables all web logging including from lower level packages such as "org.springframework.http" and modules such as codecs from "spring-core" when those are wrapped with EncoderHttpMessageWriter or DecoderHttpMessageReader.

    To see logging from the primary class loggers simply enable logging for "org.springframework.http" and "org.springframework.codec".

    从以下版本开始:
    5.1
    作者:
    Rossen Stoyanchev
    另请参阅:
    LogDelegateFactory
    • 构造器概要

      构造器 
      构造器说明
      HttpLogging() 
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型方法说明
      static LogforLog​(Log primaryLogger)
      Wrap the given primary logger with a composite logger that delegates to it or to the fallback logger "org.springframework.web.HttpLogging", if the primary is not enabled.
      static LogforLogName​(Class<?> primaryLoggerClass)
      Create a primary logger for the given class and wrap it with a composite that delegates to it or to the fallback logger "org.springframework.web.HttpLogging", if the primary is not enabled.
    • 方法详细资料

      • forLogName

        public static Log forLogName​(Class<?> primaryLoggerClass)
        Create a primary logger for the given class and wrap it with a composite that delegates to it or to the fallback logger "org.springframework.web.HttpLogging", if the primary is not enabled.
        参数:
        primaryLoggerClass - the class for the name of the primary logger
        返回:
        the resulting composite logger
      • forLog

        public static Log forLog​(Log primaryLogger)
        Wrap the given primary logger with a composite logger that delegates to it or to the fallback logger "org.springframework.web.HttpLogging", if the primary is not enabled.
        参数:
        primaryLogger - the primary logger to use
        返回:
        the resulting composite logger