HttpWebHandlerAdapter#formatRequest is protected

Closes gh-24352
This commit is contained in:
Rossen Stoyanchev 2020-01-16 14:35:45 +00:00
parent 3c0c0c0597
commit ac8eaca475
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -243,7 +243,13 @@ public class HttpWebHandlerAdapter extends WebHandlerDecorator implements HttpHa
getCodecConfigurer(), getLocaleContextResolver(), this.applicationContext);
}
private String formatRequest(ServerHttpRequest request) {
/**
* Format the request for logging purposes including HTTP method and URL.
* <p>By default this prints the HTTP method, the URL path, and the query.
* @param request the request to format
* @return the String to display, never empty or @code null}
*/
protected String formatRequest(ServerHttpRequest request) {
String rawQuery = request.getURI().getRawQuery();
String query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
return "HTTP " + request.getMethod() + " \"" + request.getPath() + query + "\"";