Skip to content

Standardize module logging#186

Merged
timkelty merged 2 commits into
3.xfrom
timkelty/common-module-log-category
Jul 13, 2026
Merged

Standardize module logging#186
timkelty merged 2 commits into
3.xfrom
timkelty/common-module-log-category

Conversation

@timkelty

Copy link
Copy Markdown
Contributor

Makes Cloud logs consistently filterable under one category while preserving structured context.

Copilot AI review requested due to automatic review settings July 13, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown

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 standardizes Craft Cloud module logging so log entries can be filtered consistently under a single category while keeping structured context attached to messages.

Changes:

  • Introduces Module::{log,info,warning,error}() helpers that log PsrMessage entries under the module category.
  • Replaces direct Craft::{info,warning,error}() calls (and ad-hoc PsrMessage usage) across several classes with the new Module::*() helpers.
  • Removes now-unneeded PsrMessage imports from call sites.

Reviewed changes

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

Show a summary per file
File Description
src/web/Session.php Routes “session opened” logging through Module::info() with structured backtrace context.
src/StaticCache.php Converts cache-tag and purge logging to Module::info/error() and removes direct PsrMessage usage.
src/signing/UrlSigner.php Standardizes malformed/invalid signature logs via Module::warning/info() with structured context.
src/queue/SqsQueue.php Uses Module::info() for unsupported release logging.
src/Module.php Adds centralized static logging helpers that wrap messages in PsrMessage and unify the log category.
src/imagetransforms/ImageTransformBehavior.php Switches warning logging to Module::warning().
src/fs/Fs.php Uses Module::warning() for image-dimension read-limit warnings.
src/AppConfig.php Converts DNS SRV resolution failure logging to Module::error().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/imagetransforms/ImageTransformBehavior.php Outdated
Copilot AI review requested due to automatic review settings July 13, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@timkelty
timkelty merged commit 55e6b86 into 3.x Jul 13, 2026
15 of 16 checks passed
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