{"repo":"envylabs/faraday-detailed_logger","free":true,"listed":false,"github":"https://github.com/envylabs/faraday-detailed_logger","clone":"git clone https://github.com/envylabs/faraday-detailed_logger.git","description":"A detailed request and response logger for Faraday.","language":"Ruby","stars":59,"topics":["faraday","middleware","ruby","logging","logger"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Faraday::DetailedLogger A Faraday middleware used for providing debug- and info-level logging information. The request and response logs follow very closely with cURL output for ease of understanding. Caution: Be careful about your log level settings when using this middleware, especially in a production environment. With a DEBUG level log enabled, there will be information security concerns. At a DEBUG level, the request and response headers and their bodies will be logged. This means that if you have Authorization information or API keys in your headers or are passing around sensitive information in the bodies, only an INFO level or above should be used. No headers or bodies are logged at an INFO or greater log level. Installation Add this line to your application's Gemfile: And then execute: Or install it yourself as: Usage Once required, the logger can be added to any Faraday connection by inserting it into your connection's request/response stack: By default, the Faraday::DetailedLogger will log to STDOUT. If this is not your desired log location, simply provide any Logger-compatible object as a parameter to the middleware definition: Or, perhaps use your Rails logger: Further, you might like to tag logged output to make it easily located in your logs: Example output Because logs generally work best with a single line of data per entry, the DEBUG-level output which contains the headers and bodies is inspected prior to logging. This crushes down and slightly manipulates t","default_branch":null,"files":null,"tree":[],"storefront":"/r/envylabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/envylabs/faraday-detailed_logger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}