Draft
Conversation
Co-authored-by: wilsonsilva <645203+wilsonsilva@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace all instances of puts with Logger
Replace Mar 19, 2026
puts with injectable Logger instance
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.
All
putscalls used for error logging were replaced with a properLoggerinstance that is configurable globally and injectable per-component, eliminating the need forallow_any_instance_ofmonkey-patches in tests.Changes
Configuration— addsloggerattr with defaultLogger.new($stdout), configurable viaJSONRPC.configureMiddleware— acceptslogger:option; defaults toconfig.logger; passes logger down toValidatorValidator— acceptslogger:kwarg in constructor; defaults toconfig.loggerfor standalone usemiddleware_spec— replacesallow_any_instance_ofwith alet(:app)that injects aninstance_double(Logger)directly into the middleware; replacesoutput(...).to_stdoutwithhave_received(:error)Usage
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.