redskap / swagger-brake

Swagger contract checker for breaking API changes
Apache License 2.0
58 stars 16 forks source link

Don't disable all logging #12

Closed dalewking closed 5 years ago

dalewking commented 5 years ago

I am trying to use swagger-brake as a library not from the CLI. It will actually be invoked as an integration test, because right now we have no swagger files in the code and use one generated by spring-fox at run time. That will hopefully change in the future.

But the problem is that just including swagger-brake as a library is causing some unit tests to fail. The reason is that it has a logback.xml that has:

<root level="OFF" >

which is turning off logging at the root level and I have some tests that verify that certain messages are logged.

You should only control your own logging, not all logging.

galovics commented 5 years ago

Solved by separating the core and CLI modules into separate Gradle modules so logback.xml is not bundled anymore with the core library.