-
Notifications
You must be signed in to change notification settings - Fork 615
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
Delayed log
overwrites logger
config?
#353
Comments
thanks for reporting this. i'll wait for your spec then. |
Added failing spec. |
Added code to fix failing spec. (It's still non-intuitive that if you use log:false, it clobbers the custom logger and uses a /dev/null logger, instead of actually turn off logging.) |
thanks @strathmeyer. unfortunately, i have several other tickets to solve before this one, but i really savon 1.2 featured a it's a simple null object which just silently ignores log messages. a better concept than littering the i'm not sure which option is better right now. maybe if you could explain what you find "non-intuitiv" let me know what you think. |
What is non-intuitive is that you can set the logger, but if you give How do you feel about the pull request as it currently stands? |
hey @strathmeyer. i quickly had a look at your pull request and added a few comments. |
i thought about your comment that this is non-intuitive and i agree. maybe it's easier to simply solve this by storing the information whether we should log or not not a great design decision, but at least it doesn't hide any weird implementation details. |
cherry-picked your spec and simplified the implementation. |
released v2.1.0. please refer to the updated changelog and documentation for details. let me know how it works! |
I can't seem to set a custom logger via
Savon.client(logger: my_logger)
If I read the code correctly, the log option is delayed until after the logger option is set, but the setting of the log option overwrites the provided logger and sets it to be either a
$stdout
logger, or a/dev/null
logger:https://github.com/savonrb/savon/blob/master/lib/savon/options.rb#L137-148
I'll come up with a spec.
The text was updated successfully, but these errors were encountered: