Skip to content

Commit

Permalink
Inline loggingMaxBody
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave committed Jun 9, 2022
1 parent 864d9c1 commit d86dec3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ final class DHttpClientContext implements HttpClientContext {
private final boolean withAuthToken;
private final AuthTokenProvider authTokenProvider;
private final AtomicReference<AuthToken> tokenRef = new AtomicReference<>();
private int loggingMaxBody = 1_000;

private final LongAdder metricResTotal = new LongAdder();
private final LongAdder metricResError = new LongAdder();
Expand Down Expand Up @@ -316,6 +315,6 @@ private String authToken() {
}

String maxResponseBody(String body) {
return body.length() > loggingMaxBody ? body.substring(0, loggingMaxBody) + " <truncated> ..." : body;
return body.length() > 1_000 ? body.substring(0, 1_000) + " <truncated> ..." : body;
}
}

0 comments on commit d86dec3

Please sign in to comment.