A Ruby gem for logging outgoing HTTP requests from your application to aid debugging and understanding API interactions.
httplog is a Ruby gem that logs outgoing HTTP requests from your application, capturing details like request methods, URLs, headers, response codes, and bodies. It helps developers debug API integrations and understand the HTTP traffic generated by their Ruby apps. The gem works by monkey-patching popular HTTP client libraries to intercept and log their calls.
Ruby developers building applications that interact with external APIs and need visibility into HTTP requests for debugging or development purposes.
Developers choose httplog because it provides a simple, zero-configuration way to log HTTP traffic across multiple Ruby HTTP clients without modifying application code. Its extensive configurability and support for compact/JSON logging formats make it adaptable to different debugging workflows.
Log outgoing HTTP requests in ruby
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with popular libraries like Net::HTTP, HTTParty, and Excon, providing a unified logging interface across multiple clients without code changes.
Allows granular control over logging parts (connect, request, headers, etc.) and offers compact or JSON formats for different needs, as shown in the configuration examples.
Filters sensitive parameters like passwords by default and supports URL allow/denylisting to reduce log noise and protect data.
Requires no application code modifications; just require the gem after HTTP libraries, with straightforward Rails initializer setup.
Explicitly warned against in production due to monkey-patching HTTP libraries, which can cause instability and performance issues.
Parameter filtering only works for standard key-value pairs, not JSON request data, leaving sensitive information exposed in logs.
Known issues with OpenURI, HTTPClient, and others affect logging accuracy, such as deferred response logging or out-of-order connection logs.