In batch, log is the life, I want to use Slf4j, so download the zip. https://www.slf4j.org/download.html
From adding an external jar Add only slf4j-api-1.7.25.jar to java
@Slf4j
public class HogeMain {
public static void main(String args[]){
...
log.info("testosterone");
...
}
When I write and execute, the following error
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.
Adding slf4j-simple-1.7.25.jar will fix it.
By the way, if you get this error, you probably added an unnecessary jar.
NoClassDefFoundError: android/util/Log
slf4j-api-1.7.25.jar slf4j-simple-1.7.25.jar If you just want to log to java, just these two jars worked for the time being
Recommended Posts