I have used SLF4J logging to print all the logs. I am using the latest version of org.slf4j.
implementation 'org.slf4j:slf4j-api:2.0.0-alpha1'
implementation 'org.slf4j:log4j-over-slf4j:2.0.0-alpha1'
But I'm getting the following error and also no logs are being printed.
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/home/user/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
The logs are working fine with the older version (1.7.25). Is there anything needs to be added or configured on the project so that these logs can be printed
It will print the messages adding slf4j-log4j12 instead of slf4j-api
Remove the following
implementation 'org.slf4j:slf4j-api:2.0.0-alpha1'
implementation 'org.slf4j:log4j-over-slf4j:2.0.0-alpha1'
Add
implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '+'