micronaut-openapi
micronaut-openapi copied to clipboard
OpenAPI module is initializing SLF4J
Expected Behavior
Should not initialize SLF4J
Actual Behaviour
Causes
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
warning: unknown enum constant When.MAYBE
Steps To Reproduce
Add openapi
and compile
Environment Information
No response
Example Application
No response
Version
3.7.1
@graemerocher Hmm... Sorry, I don't know how to get rid of slfj4j initialization correctly. The only way I know to remove this message is to add logback or slf4j-simple to dependencies
the code path that initializes SLF4J has to be removed from the compiler.
@graemerocher I went through all the code and all the dependencies. There is no use of slf4j anywhere in the project code itself.
What solutions do I see:
-
Remove the dependency on the swagger-core libraries (I have already done this anyway and will add the PR in the near future). You also need to remove the dependency on the micronaut-http library, because inside it uses slf4j - this is also not difficult to do.
-
Add to dependencies 'org.slf4j:slf4j-nop'
-
Add dependencies 'org.slf4j:slf4j-simple' or 'ch.qos.logback:logback-classic'