Skip to content

Commit

Permalink
Log downloading of every bitstream not only restricted ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak committed Nov 28, 2023
1 parent c8bc409 commit 39343bb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ public void trackBitstreamDownload(Context context, HttpServletRequest request,
private void logUserDownloadingBitstream(Context context, Bitstream bit) {
EPerson eperson = context.getCurrentUser();
if (Objects.isNull(eperson)) {
log.error("Cannot log user which is downloading restricted bitstream.");
log.info("ANONYMOUS user is trying to download bitstream " + bit.getName() + " with ID: " +
bit.getID());
return;
}

log.info("User: " + eperson.getFullName() + " with ID: " + eperson.getID() + " is downloading restricted" +
log.info("User: " + eperson.getFullName() + " with ID: " + eperson.getID() + " is downloading" +
" bitstream " + bit.getName() + " with ID: " + bit.getID());
}
}

0 comments on commit 39343bb

Please sign in to comment.