-
Notifications
You must be signed in to change notification settings - Fork 350
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
Logger debug: true does nothing at runtime #671
Comments
Using |
It looks like the issue was I had some incorrectly formatted headers that seemed to work for dispatching the actual request but were breaking logging: If that is indeed the issue, what do you think about prefacing that error message with something like "error rendering logs: " to make it a bit more clear that debug line is in place of where logs would have been emitted if not for the given error. Beyond that, possible error when non-strings are passed in header data? |
I updated the docs, please feel free to send a PR suggesting some changes |
Docs for Logger middleware say:
So I expected to be able to toggle response logging on at off when configuring clients at runtime by configuring it like so:
{Tesla.Middleware.Logger, debug: true}
But this does not appear to change logger behavior.
Since the docs also say something about the value of Logger level at compile time, I suspect what I am trying to do may not be possible currently? But it seems like it should be. My use case is that I don't normally want to log responses in prod, but sometimes I'd like to troubleshoot an issue by consoling in to that env.
The text was updated successfully, but these errors were encountered: