Standardize module logging#186
Merged
Merged
Conversation
There was a problem hiding this comment.
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 logPsrMessageentries under the module category. - Replaces direct
Craft::{info,warning,error}()calls (and ad-hocPsrMessageusage) across several classes with the newModule::*()helpers. - Removes now-unneeded
PsrMessageimports 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes Cloud logs consistently filterable under one category while preserving structured context.