@@ -20,9 +20,9 @@ public void logRequest(HttpServletRequest request, HttpServletResponse response,
20
20
String fullUrl = queryString == null ? requestUrl : requestUrl + "?" + queryString ;
21
21
22
22
String httpMethod = request .getMethod ();
23
- int httpStatus = response .getStatus ();
23
+ int statusCode = response .getStatus ();
24
24
25
- log .info ("[{}:{}] {} {} {} {}" , clientIpAddress , id , fullUrl , httpMethod , httpStatus , message );
25
+ log .info ("[{}:{}] {} {} {} {}" , clientIpAddress , id , fullUrl , httpMethod , statusCode , message );
26
26
}
27
27
28
28
public void logRequestDuration (HttpServletRequest request , HttpServletResponse response , Exception ex ) {
@@ -35,16 +35,16 @@ public void logRequestDuration(HttpServletRequest request, HttpServletResponse r
35
35
String fullUrl = queryString == null ? requestUrl : requestUrl + "?" + queryString ;
36
36
37
37
String httpMethod = request .getMethod ();
38
- int httpStatus = response .getStatus ();
38
+ int statusCode = response .getStatus ();
39
39
40
40
long startTime = (Long ) request .getAttribute ("startTime" );
41
41
long endTime = System .currentTimeMillis ();
42
42
long duration = endTime - startTime ;
43
43
44
44
if (ex == null ) {
45
- log .info ("[{}:{}] {} {} {} {}ms" , clientIpAddress , id , fullUrl , httpMethod , httpStatus , duration );
45
+ log .info ("[{}:{}] {} {} {} {}ms" , clientIpAddress , id , fullUrl , httpMethod , statusCode , duration );
46
46
} else {
47
- log .error ("[{}:{}] {} {} {} {}ms, Exception: {}" , clientIpAddress , id , fullUrl , httpMethod , httpStatus , duration , ex .getMessage ());
47
+ log .error ("[{}:{}] {} {} {} {}ms, Exception: {}" , clientIpAddress , id , fullUrl , httpMethod , statusCode , duration , ex .getMessage ());
48
48
}
49
49
}
50
50
}
0 commit comments