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

What is ExcludeTest for? #754

Closed
Sam-Kruglov opened this issue May 5, 2020 · 3 comments · Fixed by #792
Closed

What is ExcludeTest for? #754

Sam-Kruglov opened this issue May 5, 2020 · 3 comments · Fixed by #792
Assignees
Labels

Comments

@Sam-Kruglov
Copy link

Hi, was browsing the repository and found this test which doesn't seem to do anything.
https://github.com/zalando/logbook/blob/master/logbook-spring-boot-autoconfigure/src/test/java/org/zalando/logbook/autoconfigure/ExcludeTest.java

I couldn't find any place which would want org.slf4j.Logger as a Spring Bean, specifically, couldn't find the usages of httpLogger bean. This test only asserts that nobody is calling the bean, so, I think you can remove this file.

@Sam-Kruglov Sam-Kruglov added the Bug label May 5, 2020
@whiskeysierra
Copy link
Collaborator

The test verifies that the exclude feature (setting a condition to prevent logging for certain requests) actually won't produce log entries.

@Sam-Kruglov
Copy link
Author

I wanted to use the same in my custom tests but couldn't find where is this httpLogger bean goes. Was that removed?
I also think there probably should be a test here to check is this logger IS called when it should be called, otherwise, this test suit may be broken and we won't notice

@whiskeysierra
Copy link
Collaborator

I just released 2.1.2 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants