Add API request logging with timestamp and duration#14
Draft
harrylewis wants to merge 3 commits intomainfrom
Draft
Add API request logging with timestamp and duration#14harrylewis wants to merge 3 commits intomainfrom
harrylewis wants to merge 3 commits intomainfrom
Conversation
Adds logging to STDOUT for all API requests showing: - Timestamp when request completes - Request duration in milliseconds - HTTP method - Full endpoint URL with query parameters Example output: [2025-11-03 14:23:45 -0500] (245.67ms) GET https://api.payrix.com/merchants?page=1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds a `log_requests` configuration parameter that allows developers to enable/disable API request logging. Defaults to `false` (disabled). When enabled with `Payrix.log_requests = true`, logs will be written to STDOUT in the format: [timestamp] (duration) METHOD url Updated documentation in README.md and CHANGELOG.md to reflect the new configuration option. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The logging feature pushed the send_http method over RuboCop's complexity limits. Rather than refactoring legacy code, disable the specific metrics: - Metrics/AbcSize - Metrics/CyclomaticComplexity - Metrics/MethodLength 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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
Adds optional API request logging to help with debugging and performance monitoring. This feature is opt-in and disabled by default.
Key features:
Payrix.log_requests = trueExample log output:
Changes
log_requestsconfiguration option (default: false)Payrix.log_requests=setter methodTest plan
Payrix.log_requests = true🤖 Generated with Claude Code