Skip to content

Commit

Permalink
update logs to use logger templating
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Mar 4, 2021
1 parent a0e88ee commit 0a6cba8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public FeesFines getFeesFines(String uin) throws ParseException {
String url = String.format("%s/%s/%s?%s", properties.getBaseEdgeUrl(), path, uin, queryString);
String apiKey = properties.getEdgeApiKey();

logger.debug(String.format("Asking for fines from: %s", url));
logger.debug("Asking for fines from: {}", url);

JsonNode node = restTemplate.getForObject(url, JsonNode.class, apiKey);

Expand Down Expand Up @@ -157,7 +157,7 @@ public List<LoanItem> getLoanItems(String uin) throws ParseException {
String url = String.format("%s/%s/%s?apikey={apikey}%s", properties.getBaseEdgeUrl(), path, uin, additional);
String apiKey = properties.getEdgeApiKey();

logger.debug(String.format("Asking for patron loans from: %s", url));
logger.debug("Asking for patron loans from: {}", url);

JsonNode node = restTemplate.getForObject(url, JsonNode.class, apiKey);

Expand Down Expand Up @@ -207,7 +207,7 @@ private List<HoldingsRecord> requestHoldings(String instanceId, String holdingId

String url = String.format("%s/%s?%s", properties.getBaseEdgeUrl(), oaiPath, queryString);

logger.debug("Asking for holdings from: " + url);
logger.debug("Asking for holdings from: {}", url);

String result = restTemplate.getForObject(url, String.class);

Expand Down Expand Up @@ -320,15 +320,15 @@ private HoldingsRecord processMarcRecord(String instanceId, Node marcRecord) {
// different nesting structure in the XML.
Map<String, String> holdingValues = Marc21Xml.buildCoreHolding(NODE_PREFIX, marcRecord);

logger.debug("MarcRecordLeader: " + recordValues.get(RECORD_MARC_RECORD_LEADER));
logger.debug("MFHD: " + holdingValues.get(RECORD_MFHD));
logger.debug("ISBN: " + recordValues.get(RECORD_ISBN));
logger.debug("Fallback Location: " + holdingValues.get(RECORD_FALLBACK_LOCATION_CODE));
logger.debug("Call Number: " + holdingValues.get(RECORD_CALL_NUMBER));
logger.debug("Marc record leader: {}", recordValues.get(RECORD_MARC_RECORD_LEADER));
logger.debug("MFHD: {}", holdingValues.get(RECORD_MFHD));
logger.debug("ISBN: {}", recordValues.get(RECORD_ISBN));
logger.debug("Fallback location: {}", holdingValues.get(RECORD_FALLBACK_LOCATION_CODE));
logger.debug("Call number: {}", holdingValues.get(RECORD_CALL_NUMBER));

Boolean validLargeVolume = Boolean.valueOf(holdingValues.get(RECORD_VALID_LARGE_VOLUME));

logger.debug("Valid Large Volume: " + validLargeVolume);
logger.debug("Valid large volume: {}", validLargeVolume);

Map<String, Map<String, String>> catalogItems = new HashMap<String, Map<String, String>>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public List<HoldingsRecord> getHoldingsByBibId(String bibId) {
logger.debug("The holdings count: {}", holdingCount);

for (int i = 0; i < holdingCount; i++) {
logger.debug("Current holdings: " + holdings.item(i).getAttributes().getNamedItem("href").getTextContent());
logger.debug("Current holdings: {}", holdings.item(i).getAttributes().getNamedItem("href").getTextContent());
Map<String, String> holdingValues = Marc21Xml.buildCoreHolding(holdings.item(i));

logger.debug("Marc record leader: {}", recordValues.get(RECORD_MARC_RECORD_LEADER));
Expand Down Expand Up @@ -137,7 +137,7 @@ public List<HoldingsRecord> getHoldingsByBibId(String bibId) {
}
} else {
if (childNodes.item(1) != null) {
logger.debug("Item URL: " + childNodes.item(1).getAttributes().getNamedItem("href").getTextContent());
logger.debug("Item URL: {}", childNodes.item(1).getAttributes().getNamedItem("href").getTextContent());
}

for (int j = 0; j < childCount; j++) {
Expand Down

0 comments on commit 0a6cba8

Please sign in to comment.