Example usage for org.springframework.http HttpLogging forLog

List of usage examples for org.springframework.http HttpLogging forLog

Introduction

In this page you can find the example usage for org.springframework.http HttpLogging forLog.

Prototype

public static Log forLog(Log primaryLogger) 

Source Link

Document

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.

Usage

From source file:org.springframework.http.codec.DecoderHttpMessageReader.java

private void initLogger(Decoder<T> decoder) {
    if (decoder instanceof AbstractDecoder
            && decoder.getClass().getPackage().getName().startsWith("org.springframework.core.codec")) {

        Log logger = HttpLogging.forLog(((AbstractDecoder) decoder).getLogger());
        ((AbstractDecoder) decoder).setLogger(logger);
    }/*from ww  w .  ja v  a  2s  .  co m*/
}

From source file:org.springframework.http.codec.EncoderHttpMessageWriter.java

private void initLogger(Encoder<T> encoder) {
    if (encoder instanceof AbstractEncoder
            && encoder.getClass().getPackage().getName().startsWith("org.springframework.core.codec")) {

        Log logger = HttpLogging.forLog(((AbstractEncoder) encoder).getLogger());
        ((AbstractEncoder) encoder).setLogger(logger);
    }/*  www.  j  a  v  a 2  s.c  o  m*/
}