Replace puts in tasks and generators with Rails.logger or Logger.new#6244
Merged
tvdeyen merged 1 commit intosolidusio:mainfrom May 30, 2025
Merged
Replace puts in tasks and generators with Rails.logger or Logger.new#6244tvdeyen merged 1 commit intosolidusio:mainfrom
puts in tasks and generators with Rails.logger or Logger.new#6244tvdeyen merged 1 commit intosolidusio:mainfrom
Conversation
tvdeyen
approved these changes
May 29, 2025
jarednorman
approved these changes
May 29, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6244 +/- ##
==========================================
- Coverage 88.82% 88.82% -0.01%
==========================================
Files 850 850
Lines 18334 18336 +2
==========================================
+ Hits 16286 16287 +1
- Misses 2048 2049 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@mamhoff there is a valid spec error https://github.com/solidusio/solidus/actions/runs/15340861947/job/43166600606?pr=6244 |
auto-merge was automatically disabled
May 30, 2025 10:23
Head branch was pushed to by a user without write access
We should not use `puts` here, but instead the configured Rails logger. A log level of `info` is appropriate for all of these instances. In Generators, we use Thor's `say` method instead.
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.
Summary
We should not use
putshere, but instead the configured Rails logger. A log level ofinfois appropriate for all of these instances.In the Dummy App generator, Rails is not yet loaded, so we use the normal logger instead.
Extracted from #6240
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs: