Skip to content

Reduce noisy WARN logs to DEBUG level#1271

Open
milanmajchrak wants to merge 1 commit intocustomer/zcu-pubfrom
propagate/reduce-warn-logs-zcu-pub
Open

Reduce noisy WARN logs to DEBUG level#1271
milanmajchrak wants to merge 1 commit intocustomer/zcu-pubfrom
propagate/reduce-warn-logs-zcu-pub

Conversation

@milanmajchrak
Copy link
Collaborator

Cherry-pick of PR #1263 into customer/zcu-pub.

Problem description

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'

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:48
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 cherry-pick aims to reduce log noise by lowering two frequently occurring messages from WARN to DEBUG, helping keep production logs focused on actionable warnings.

Changes:

  • Adds a DEBUG log in Context.init() when a Context is initialized while a transaction is already active.
  • Lowers the “approximate date is empty” message in ClarinItemServiceImpl.updateItemDatesMetadata() from WARN to DEBUG.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dspace-api/src/main/java/org/dspace/core/Context.java Adds a DEBUG log for “context initialized while transaction active”
dspace-api/src/main/java/org/dspace/content/clarin/ClarinItemServiceImpl.java Reduces log level for empty approximate date from WARN to DEBUG

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

} 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