Skip to content

Commit

Permalink
Clean fieldId before logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed Dec 19, 2024
1 parent d05660f commit 71f20e0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ public ByteArrayResource getFile(String fileId) throws IOException {
}
// the output path for getObject must not exist, hence temp dir is created on the fly
ocflRepository.getObject(ObjectVersionId.head(fileId), tempLoadDir);
LOG.debug("File Service: File with ID {} was loaded from the repo", fileId);
String loggingFieldId = StringUtils.replaceChars(fileId, "\n\r", " ");
LOG.debug("File Service: File with ID {} was loaded from the repo", loggingFieldId);
Path fileNamePath = Objects.requireNonNull(tempLoadDir.toFile().listFiles())[0].toPath();
loadedResource = new ByteArrayResource(Files.readAllBytes(fileNamePath));

Expand Down

0 comments on commit 71f20e0

Please sign in to comment.