Skip to content

Commit

Permalink
#7023 Replace xml response substring in logging with URL parameters. …
Browse files Browse the repository at this point in the history
…Couldn't write the whole URL because the "&" gets written as the character entity "&" as the log is an XML.
  • Loading branch information
JingMa87 committed Jun 25, 2020
1 parent b97185a commit f6d336b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public void harvestRecord(String baseURL, String identifier, String metadataPref
} catch (XMLStreamException ex) {
//Logger.getLogger("global").log(Level.SEVERE, null, ex);
if (this.errorMessage == null) {
this.errorMessage = "Malformed GetRecord response: " + oaiResponseHeader;
this.errorMessage = "Malformed GetRecord response; baseURL=" + baseURL + ", identifier=" + identifier + ", metadataPrefix=" + metadataPrefix;
}

// delete the temp metadata file; we won't need it:
Expand Down Expand Up @@ -413,10 +413,7 @@ public void harvestRecord(String baseURL, String identifier, String metadataPref
}

if (!(metadataWritten) && !(this.isDeleted())) {
if (oaiResponseHeader.length() > 64) {
oaiResponseHeader = oaiResponseHeader.substring(0, 32) + "...";
}
this.errorMessage = "Failed to parse GetRecord response; "+oaiResponseHeader;
this.errorMessage = "Failed to parse GetRecord response; baseURL=" + baseURL + ", identifier=" + identifier + ", metadataPrefix=" + metadataPrefix;
//savedMetadataFile.delete();
}

Expand Down

0 comments on commit f6d336b

Please sign in to comment.