-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to adjust log levels? #27
Comments
Newer versions of Faraday::Response::Logger accept Logger instances (https://github.com/lostisland/faraday/blob/c80cf86c5a09be0f0cdc3dd00d1c85390fe55d5b/lib/faraday/response/logger.rb#L9). Printing bodies of POST requests could also be useful, and Faraday::Response::Logger provides that when |
Could you give us more detail of the trouble point? I'm not sure why that verbose option doesn't work for your requirement. |
The verbose option prints something like this:
While this information is "verbose", we don't need all of this in our logs; so, I'd like to have control over this. We have patched GarageClient in our application to make it show compact logs like this:
|
Got it, I also think current "verbose option" is too much for most of usec ases, so cloud we just change current GarageClient's "verbose option" behavior instead of adding more extensible API above? I don't think current "verbose option" is not good default behavior, so we can change this (IMO). If we face additional more verbose requirement later, we can add that with extensible API. I think default behaviors should be simple and fit to most of use cases or basic requirements. |
I'm working on a webapp which utilizes garage_client to communicate with another backend server, and would like to see garage_client requests in the logs.
GarageClient::Client#new takes the
:verbose
option, which is passed down to the underlying Faraday object, but its output is a bit noisy for the above usage.So, my question is: could garage_client have an option to adjust the log level?
I'm thinking of something like aws-sdk-ruby, which has a configurable logger (e.g.
AWS.config(:log_level => :debug)
), which could even take a format string like this (docs):@cookpad/dev-infra What do you think?
The text was updated successfully, but these errors were encountered: