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

reduce amount of default logging on a failed request #122

Merged
merged 5 commits into from
May 26, 2021

Conversation

jsvd
Copy link
Member

@jsvd jsvd commented May 17, 2021

fixes #106

jsvd added 2 commits May 25, 2021 14:05
* hide headers, body and backtrace
* these are shown if log.level is debug
@jsvd jsvd force-pushed the reduce_debugging branch from f35b782 to 1d4385f Compare May 25, 2021 15:39
@elasticsearch-bot elasticsearch-bot self-assigned this May 26, 2021
@kaisecheng kaisecheng self-requested a review May 26, 2021 09:55
Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

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

I left one comment for the variable name, otherwise LGTM

lib/logstash/outputs/http.rb Outdated Show resolved Hide resolved
@jsvd
Copy link
Member Author

jsvd commented May 26, 2021

Thanks for the review @kaisecheng. Your comment made me realize two things:

  • this code path wasn't actually being tested anywhere in the test suite
  • the tests I added were covering the part of the code that handled the responses for requests that succeeded and not when client.send raised an exception

I added a new commit that fixes the variable name and also moved the tests to the right place. Now if the variable is not defined, the tests will fail. Because of all of these changes I'm re-requesting a review. thanks!

@jsvd jsvd requested a review from kaisecheng May 26, 2021 13:16
spec/outputs/http_spec.rb Outdated Show resolved Hide resolved
spec/outputs/http_spec.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

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

LGTM 💯 test looks good as well.

@jsvd jsvd merged commit 19810ea into logstash-plugins:master May 26, 2021
@jsvd jsvd deleted the reduce_debugging branch May 26, 2021 14:55
@jsvd jsvd mentioned this pull request May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security] Headers content dumped in logs
4 participants