When I run the standalone main application (fat jar including all the dependencies), I see the below log in the console
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.
When I run same standalone main application (without fat jar) and added the above log4j and slf4j dependencies to classpath, I don't see any issue
I was using log4j version 2.23.1 which comes with slf4j-api version 2.0.9. Below are the dependencies:
<log4j2.version>2.23.1</log4j2.version>
And I was using maven-assembly-plugin to build a single jar with all dependencies
Included the following imports:
Using slf4j logger
When I run the standalone main application (fat jar including all the dependencies), I see the below log in the console
When I run same standalone main application (without fat jar) and added the above log4j and slf4j dependencies to classpath, I don't see any issue