Skip to content

refactor(log): simplify and optimize log level evaluation#62468

Draft
joshtrichards wants to merge 2 commits into
masterfrom
jtr/refactor-log-getLogLevel
Draft

refactor(log): simplify and optimize log level evaluation#62468
joshtrichards wants to merge 2 commits into
masterfrom
jtr/refactor-log-getLogLevel

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Avoid unnecessary user-session lookups for log-condition rules rejected by app or message filters, and improve the readability and maintainability of log-level evaluation.

Changes:

  • Extract log-condition evaluation from getLogLevel()
  • Defer user-session lookup until a matching rule requires it
  • Add test coverage for skipped user lookups and first-match precedence in configured log conditions

Log-level selection behavior remains unchanged.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Extract log-condition evaluation from getLogLevel() and defer user-session lookup until a matching rule requires it.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Add coverage for skipping unnecessary user lookups and preserving first-match precedence for configured log conditions.

Assisted-by:  Copilot:GPT-5.6

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Jul 24, 2026
@joshtrichards joshtrichards added 2. developing Work in progress feature: logging performance 🚀 ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress AI assisted feature: logging performance 🚀 ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants