netbox-client-ruby
netbox-client-ruby copied to clipboard
Faraday logging to file
Right now there does not seem to be a way to specify a log file for Faraday. The output simply goes to STDOUT.
Faraday.new(url: config.netbox.api_base_url, headers: headers, ssl: config.faraday.ssl_options) do |faraday|
faraday.request request_encoding
faraday.response config.faraday.logger if config.faraday.logger
It would be handy if the last line was something like
faraday.response *config.faraday.logger if config.faraday.logger
I believe that would enable:
NetboxClientRuby.configure do |config|
config.faraday.logger = :logger, Logger.new('faraday.log')
This is entirely untested though...