Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jm committed Dec 23, 2024
1 parent 6bd2e76 commit e04ae1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dspace-api/src/main/java/org/dspace/core/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ public void commit() throws SQLException {
// Commit our changes (this closes the transaction but leaves database connection open)
dbConnection.commit();
reloadContextBoundEntities();
log.info("commit() method - Committing transaction END.");
} else {
log.info("commit() method - No database connection to commit to.");
}
Expand Down Expand Up @@ -602,6 +603,7 @@ public void rollback() throws SQLException {
dbConnection.rollback();
log.info("rollback() method - Transaction successfully rolled back.");
reloadContextBoundEntities();
log.info("rollback() method - Transaction successfully rolled back END.");
}
} catch (SQLException e) {
log.error("Error rolling back transaction", e);
Expand Down Expand Up @@ -812,6 +814,7 @@ protected void finalize() throws Throwable {

log.info("finalize() method - calling super.finalize().");
super.finalize();
log.info("finalize() method - calling super.finalize() END.");
}

public void shutDownDatabase() throws SQLException {
Expand Down
1 change: 0 additions & 1 deletion dspace-api/src/main/java/org/dspace/eperson/EPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public class EPerson extends DSpaceObject implements DSpaceObjectLegacySupport {
* {@link org.dspace.eperson.service.EPersonService#create(Context)}
*/
protected EPerson() {
ThreadContext.put("classID", String.valueOf(System.identityHashCode(this)));
Exception exception = new Exception("Stack trace for EPerson creation");
log.info("EPerson created", exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ private void addTokenToResponse(final HttpServletRequest request, final HttpServ
resetCSRFToken(request, response);
}
response.setHeader(AUTHORIZATION_HEADER, String.format("%s %s", AUTHORIZATION_TYPE, token));
log.info("DQ: Added token to request");
}

/**
Expand Down

0 comments on commit e04ae1b

Please sign in to comment.