Skip to content

Faraday logging to file #112

Description

@amorsen

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...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions