Skip to content

Add Response Logging#38

Open
jmazur wants to merge 1 commit intomainfrom
jm-add-logging
Open

Add Response Logging#38
jmazur wants to merge 1 commit intomainfrom
jm-add-logging

Conversation

@jmazur
Copy link
Copy Markdown
Owner

@jmazur jmazur commented Feb 15, 2026

I have noticed some uncaught edge cases with the API response. We need to add some response logging for debug purposes so we can find these edge cases and properly catch them.

This change addresses the need by:

  • Add the ability to set a logger
  • Add flag to enable response logging

@jmazur jmazur self-assigned this Feb 15, 2026
Comment thread lib/go_transit.rb

def logger
@logger ||= Logger.new($stdout).tap do |log|
log.progname = self.name
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Style/RedundantSelf: Redundant self detected.

Comment thread lib/go_transit.rb
custom_base_url || "https://api.openmetrolinx.com/OpenDataAPI/api"
end

def logger
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lint/DuplicateMethods: Method GoTransit.logger is defined at both lib/go_transit.rb:68 and lib/go_transit.rb:78.

Comment thread lib/go_transit/version.rb
@@ -1,3 +1,3 @@
module GoTransit
VERSION = "1.0.2".freeze
VERSION = "1.1.2".freeze
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread spec/client_spec.rb
Comment thread spec/client_spec.rb
Comment thread spec/client_spec.rb
Comment thread spec/client_spec.rb
Comment thread spec/client_spec.rb
Comment thread spec/client_spec.rb
I have noticed some uncaught edge cases with the API response. We need
to add some response logging for debug purposes so we can find these
edge cases and properly catch them.

This change addresses the need by:
* Add the ability to set a logger
* Add flag to enable response logging
* Bump version

WWW
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.

1 participant