Skip to content

refactor(log): clarify LogDetails timestamp and message normalization paths#61170

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

refactor(log): clarify LogDetails timestamp and message normalization paths#61170
joshtrichards wants to merge 2 commits into
masterfrom
jtr/refactor-logDetails

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Refactor LogDetails::logDetails() for clarity without changing behavior.

This makes the method easier to follow by splitting timestamp creation into named steps, replacing compact() with an explicit entry array, and normalizing array messages before building the final log entry.

Changes

  • clarify timestamp creation and fallback handling
  • avoid reusing $time as both a DateTime and formatted string
  • replace compact() with an explicit associative array
  • group request-derived fields more clearly
  • improve inline comments around timestamp and message normalization logic

Behavior

No intended functional changes. Existing timestamp, timezone fallback, and message normalization behavior is preserved.

Checklist

AI (if applicable)

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

…clarity

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Jun 10, 2026
@joshtrichards joshtrichards added 2. developing Work in progress feature: logging ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jun 10, 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 feature: logging ♻️ 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.

1 participant