Skip to content
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

Pass the provided Savon/custom logger to Faraday #1017

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

larskanis
Copy link
Contributor

What kind of change is this?

A bugfix for savon-3.0.0.rc1

Did you add tests for your changes?

I modified already present tests.

Summary of changes

If the Savon logger isn't passed to Faraday, it builds a new logger to $stdout and logs to it. This results in stdout logging whenever log: true is set as a savon option, instead of logging to a file or so.

Passing the Savon/custom logger to Faraday avoids the creation of a second logger object by Faraday and allows to capture all logs to a user provided Logger object.

Other information

This patch also removes the level option, which is no recognized Faraday option. There is the option log_level only, which determines which log level which the messages are flagged by Faraday. In contrast the log_level option of Savon determines the minimum level of logs, which are captured by the logger.

If the Savon logger isn't passed to Faraday, it builds a new logger to $stdout and logs to it.
This results in stdout logging whenever `log: true` is set as a savon option, instead of logging to a file or so.

Passing the Savon/custom logger to Faraday avoids the creation of a second logger object by Faraday and allows to capture all logs to a user provided Logger object.

This patch also removes the `level` option, which is no recognized Faraday option.
There is the option `log_level` only, which determines which log level which the messages are flagged by Faraday.
In contrast the `log_level` option of Savon determines the minimum level of logs, which are captured by the logger.
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ready to me!

@pcai pcai merged commit 9cae923 into savonrb:main Nov 16, 2024
7 checks passed
@pcai
Copy link
Member

pcai commented Nov 16, 2024

thank you.

@larskanis larskanis deleted the fix-logger branch November 16, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants