remove aggressive logging

This commit is contained in:
Jörg Prante 2021-02-05 12:00:11 +01:00
parent e1369a2413
commit 3459514a9a

View file

@ -185,18 +185,14 @@ public class OAIClient {
} }
ListRecordsResponse listRecordsResponse = new ListRecordsResponse(listRecordsRequest); ListRecordsResponse listRecordsResponse = new ListRecordsResponse(listRecordsRequest);
URL.Builder url = URL.from(baseURL).mutator(); URL.Builder url = URL.from(baseURL).mutator();
logger.log(Level.FINE, "before: baseURL = " + baseURL + " url = " + url.build() + " uri = ");
// kind of hacky here - suppress all OAI params if resumption token is present // kind of hacky here - suppress all OAI params if resumption token is present
if (listRecordsRequest.getResumptionToken() == null) { if (listRecordsRequest.getResumptionToken() == null) {
logger.log(Level.FINE, "no resumption token, params are " + listRecordsRequest.getParams() );
listRecordsRequest.getParams().forEach(url::queryParam); listRecordsRequest.getParams().forEach(url::queryParam);
} else { } else {
logger.log(Level.FINE, "no params because of resumption token " + listRecordsRequest.getResumptionToken());
url.queryParam(OAIConstants.VERB_PARAMETER, OAIConstants.LIST_RECORDS); url.queryParam(OAIConstants.VERB_PARAMETER, OAIConstants.LIST_RECORDS);
url.queryParam(OAIConstants.RESUMPTION_TOKEN_PARAMETER, listRecordsRequest.getResumptionToken().toString()); url.queryParam(OAIConstants.RESUMPTION_TOKEN_PARAMETER, listRecordsRequest.getResumptionToken().toString());
} }
URI uri = URI.create(url.build().toExternalForm()); URI uri = URI.create(url.build().toExternalForm());
logger.log(Level.FINE, "after: baseURL = " + baseURL + " url = " + url.build() + " uri = " + uri);
HttpRequest httpRequest = HttpRequest.newBuilder() HttpRequest httpRequest = HttpRequest.newBuilder()
.uri(uri) .uri(uri)
.header("accept", "utf-8") .header("accept", "utf-8")