From c3c592ab95126833459e75b3184a42a4a7e2e492 Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Tue, 3 Mar 2026 16:55:41 +0100 Subject: [PATCH] Reduce noisy WARN logs to DEBUG level Changed two frequently occurring WARN log messages to DEBUG level: - Context.java: 'Initializing a context while an active transaction exists' - ClarinItemServiceImpl.java: 'Cannot update item dates metadata because the approximate date is empty' --- dspace-api/src/main/java/org/dspace/core/Context.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dspace-api/src/main/java/org/dspace/core/Context.java b/dspace-api/src/main/java/org/dspace/core/Context.java index 9ba80ead6a4a..5437b0fbc0b2 100644 --- a/dspace-api/src/main/java/org/dspace/core/Context.java +++ b/dspace-api/src/main/java/org/dspace/core/Context.java @@ -181,6 +181,11 @@ protected void init() { if (dbConnection == null) { log.fatal("Cannot obtain the bean which provides a database connection. " + "Check previous entries in the dspace.log to find why the db failed to initialize."); + } else { + if (isTransactionAlive()) { + log.debug("Initializing a context while an active transaction exists. Context with hash: {}.", + getHash()); + } } }