mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-15 00:00:44 -04:00
Adds logging support for stripe-ruby in a similar way that we did it for stripe-python [1], with the idea that users you can optionally get some additional low-cost-to-configure logging for operational visibility or debugging. I made a few tweaks from the Python implementation (which I'll try to contribute back to there): * Added an elapsed parameter to responses so you can tell how long they lasted. * Mixed in idempotency_key to all lines that users have a way to aggregate logs related to a request from start to finish. * Standardized naming between different log lines as much as possible. * Detect a TTY and produce output that's colorized and formatted. [1] https://github.com/stripe/stripe-python/pull/269