|
|
@ -41,10 +41,11 @@ import org.springframework.web.util.WebUtils; |
|
|
|
* |
|
|
|
* |
|
|
|
* <p>Subclasses are passed the message to write to the log in the {@code beforeRequest} and |
|
|
|
* <p>Subclasses are passed the message to write to the log in the {@code beforeRequest} and |
|
|
|
* {@code afterRequest} methods. By default, only the URI of the request is logged. However, |
|
|
|
* {@code afterRequest} methods. By default, only the URI of the request is logged. However, |
|
|
|
* setting the {@code includeQueryString} property to {@code true} will cause the query string |
|
|
|
* setting the {@code includeQueryString} property to {@code true} will cause the query string of |
|
|
|
* of the request to be included also. The payload (body) of the request can be logged via the |
|
|
|
* the request to be included also; this can be further extended through {@code includeClientInfo} |
|
|
|
* {@code includePayload} flag. Note that this will only log that which is read, which might |
|
|
|
* and {@code includeHeaders}. The payload (body content) of the request can be logged via the |
|
|
|
* not be the entire payload. |
|
|
|
* {@code includePayload} flag: Note that this will only log the part of the payload which has |
|
|
|
|
|
|
|
* actually been read, not necessarily the entire body of the request. |
|
|
|
* |
|
|
|
* |
|
|
|
* <p>Prefixes and suffixes for the before and after messages can be configured using the |
|
|
|
* <p>Prefixes and suffixes for the before and after messages can be configured using the |
|
|
|
* {@code beforeMessagePrefix}, {@code afterMessagePrefix}, {@code beforeMessageSuffix} and |
|
|
|
* {@code beforeMessagePrefix}, {@code afterMessagePrefix}, {@code beforeMessageSuffix} and |
|
|
@ -137,7 +138,7 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter |
|
|
|
* Return whether the request headers should be included in the log message. |
|
|
|
* Return whether the request headers should be included in the log message. |
|
|
|
* @since 4.3 |
|
|
|
* @since 4.3 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public boolean isIncludeHeaders() { |
|
|
|
protected boolean isIncludeHeaders() { |
|
|
|
return this.includeHeaders; |
|
|
|
return this.includeHeaders; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|