Skip to content

Commit 0b1e4da

Browse files
Avoid converting request record to string when not logged
Change-Id: I670df5e2cc3383d90624185501333fef0fce0d99
1 parent e1306b4 commit 0b1e4da

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cf-java-logging-support-jersey/src/main/java/com/sap/hcp/cf/logging/jersey/filter/ResponseHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void handle(ResponseContextAdapter responseContext, RequestRecord rr) {
1919
rr.addTag(Fields.RESPONSE_CONTENT_TYPE, responseContext.getHeader(HttpHeaders.CONTENT_TYPE));
2020
rr.addValue(Fields.RESPONSE_STATUS, new LongValue(responseContext.getStatus()));
2121
rr.stop();
22-
LOGGER.info(Markers.REQUEST_MARKER, rr.toString());
22+
LOGGER.info(Markers.REQUEST_MARKER, "{}", rr);
2323
/*
2424
* -- close this instance
2525
*/

cf-java-logging-support-servlet/src/main/java/com/sap/hcp/cf/logging/servlet/filter/RequestLoggingFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private void doFilterRequest(HttpServletRequest httpRequest, HttpServletResponse
143143
/*
144144
* -- log info
145145
*/
146-
LOGGER.info(Markers.REQUEST_MARKER, rr.toString());
146+
LOGGER.info(Markers.REQUEST_MARKER, "{}", rr);
147147
/*
148148
* -- close this
149149
*/

0 commit comments

Comments
 (0)