From b08405f266eabf954cae57b836a7b1581e3d5284 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' --- .../src/main/java/org/dspace/core/Context.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 82b39dd2dfc7..03cf8538f181 100644 --- a/dspace-api/src/main/java/org/dspace/core/Context.java +++ b/dspace-api/src/main/java/org/dspace/core/Context.java @@ -176,11 +176,16 @@ 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."); - } - } - - currentUser = null; - currentLocale = I18nUtil.getDefaultLocale(); +<<<<<<< HEAD +======= + } else { + if (isTransactionAlive()) { + log.debug("Initializing a context while an active transaction exists. Context with hash: {}.", + } else { + if (isTransactionAlive()) { + log.debug("Initializing a context while an active transaction exists. Context with hash: {}.", + getHash()); + } extraLogInfo = ""; ignoreAuth = false;