Skip to content

Reduce noisy WARN logs to DEBUG level#1272

Open
milanmajchrak wants to merge 1 commit intocustomer/mendelufrom
propagate/reduce-warn-logs-mendelu
Open

Reduce noisy WARN logs to DEBUG level#1272
milanmajchrak wants to merge 1 commit intocustomer/mendelufrom
propagate/reduce-warn-logs-mendelu

Conversation

@milanmajchrak
Copy link
Collaborator

Cherry-pick of PR #1263 into customer/mendelu.

Problem description

Changed one frequently occurring WARN log message to DEBUG level:

  • Context.java: 'Initializing a context while an active transaction exists'

Note: ClarinItemServiceImpl.java does not exist in this branch, so only Context.java change is applied.

Original PR: #1263

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'
Copilot AI review requested due to automatic review settings March 13, 2026 11:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce log noise by lowering the severity of a frequently occurring log message during Context initialization in the DSpace core API.

Changes:

  • Adds a DEBUG log when initializing a Context while an active transaction exists (intended to replace/avoid a WARN).

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +186 to +187
log.debug("Initializing a context while an active transaction exists. Context with hash: {}.",
getHash());
Comment on lines +184 to +188
} else {
if (isTransactionAlive()) {
log.debug("Initializing a context while an active transaction exists. Context with hash: {}.",
getHash());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants