Carried over from #126 and originally requested by @akshah123.
The client currently has no supported way to inject a logger such as Rails.logger and observe outgoing requests and incoming responses. A logger integration would help applications debug API behavior and correlate SDK traffic with their own logs.
Desired behavior
- Accept a standard Ruby logger-compatible object at client construction (including
Rails.logger).
- Log useful request and response metadata with configurable verbosity.
- Redact authorization credentials and other sensitive headers by default.
- Make body/payload logging explicit and safe, especially for file uploads and streaming responses.
- Include request IDs, status, timing, and retry information where available.
- Document the feature and add tests for redaction and streaming behavior.
Related: #242 tracks a narrower request for retry callbacks/visibility. Source: #126.
Carried over from #126 and originally requested by @akshah123.
The client currently has no supported way to inject a logger such as
Rails.loggerand observe outgoing requests and incoming responses. A logger integration would help applications debug API behavior and correlate SDK traffic with their own logs.Desired behavior
Rails.logger).Related: #242 tracks a narrower request for retry callbacks/visibility. Source: #126.