wrap log statement with logger.isDebugEnabled
This commit is contained in:
parent
467dfbda0c
commit
1f7f6e2709
|
@ -52,8 +52,10 @@ final class RequestLogger {
|
||||||
* Logs a request that yielded a response
|
* Logs a request that yielded a response
|
||||||
*/
|
*/
|
||||||
static void log(Log logger, String message, HttpUriRequest request, HttpHost host, HttpResponse httpResponse) {
|
static void log(Log logger, String message, HttpUriRequest request, HttpHost host, HttpResponse httpResponse) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(message + " [" + request.getMethod() + " " + host + request.getRequestLine().getUri() +
|
logger.debug(message + " [" + request.getMethod() + " " + host + request.getRequestLine().getUri() +
|
||||||
"] [" + httpResponse.getStatusLine() + "]");
|
"] [" + httpResponse.getStatusLine() + "]");
|
||||||
|
}
|
||||||
|
|
||||||
if (tracer.isTraceEnabled()) {
|
if (tracer.isTraceEnabled()) {
|
||||||
String requestLine;
|
String requestLine;
|
||||||
|
|
Loading…
Reference in New Issue