Skip to content

Comments

chore: align logging configuration keys under logging.* namespace DHIS2-20960#22995

Merged
teleivo merged 1 commit intomasterfrom
DHIS2-20960
Feb 20, 2026
Merged

chore: align logging configuration keys under logging.* namespace DHIS2-20960#22995
teleivo merged 1 commit intomasterfrom
DHIS2-20960

Conversation

@teleivo
Copy link
Contributor

@teleivo teleivo commented Feb 19, 2026

Align logging-related dhis.conf keys under a consistent logging.* namespace. These configs are targeted at developers debugging DHIS2 instances, not end users, so we do not need to maintain backward compatibility.

logging.request_id.enabled was renamed to logging.session_id because the old name was misleading. The feature does not deal with request IDs. It adds a hashed session ID to the MDC (sessionId key), which log4j2 can include in log output via %X{sessionId}.

Renames

Old New
enable.query.logging logging.query
slow.query.logging.threshold.time logging.query.slow_threshold
method.query.logging.enabled logging.query.method
logging.request_id.enabled logging.session_id

Removed

Key Reason
elapsed.time.query.logging.enabled Redundant. It logged Query took Xmsec after every query, which is a noisier, less useful version of what logging.query.slow_threshold already provides (logs slow queries at WARN level with the full query text).

@teleivo teleivo force-pushed the DHIS2-20960 branch 3 times, most recently from 8831c1f to 0cb8334 Compare February 19, 2026 10:15

/** Database debugging feature. Defines threshold for logging of slow queries in the log. */
LOGGING_QUERY_SLOW_THRESHOLD(
"logging.query.slow_threshold", String.valueOf(SECONDS.toMillis(1)), false),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@netroms is that not a pretty low default? 😅 at least from what I see our queries take

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! 🙏

@sonarqubecloud
Copy link

@enricocolasante
Copy link
Contributor

These configs are targeted at developers debugging DHIS2 instances, not end users, so we do not need to maintain backward compatibility.

I agree but I would still find a way to communicate these changes (not sure if it make sense to have it in release notes or have a message on some slack channel) so anyone interested is warned that they have changed. I am just thinking that for @bobjolliffe or anyone like him would be helpful to know that they changed.

@teleivo
Copy link
Contributor Author

teleivo commented Feb 20, 2026

These configs are targeted at developers debugging DHIS2 instances, not end users, so we do not need to maintain backward compatibility.

I agree but I would still find a way to communicate these changes (not sure if it make sense to have it in release notes or have a message on some slack channel) so anyone interested is warned that they have changed. I am just thinking that for @bobjolliffe or anyone like him would be helpful to know that they changed.

I'll write it into the release notes 👌🏻

@teleivo teleivo merged commit 10861c6 into master Feb 20, 2026
16 checks passed
@teleivo teleivo deleted the DHIS2-20960 branch February 20, 2026 08:34
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.

5 participants