No logging for merge-cli
markusstraub opened this issue · comments
Running the merge CLI tells me that logging is broken:
java -jar onebusaway-gtfs-merge-cli-1.4.4.jar a.zip b.zip out.zip
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/REDACTED/onebusaway-gtfs-merge-cli-1.4.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
Reading documentation mentioned in the last line I thought this would help:
java -cp slf4j-simple-2.0.7.jar -jar onebusaway-gtfs-merge-cli-1.4.4.jar a.zip b.zip out.zip
But unfortunately I get the same messages.
Platform: OpenJDK 17, Ubuntu 22.04
Note, that everything works as expected until version 1.3.118. Later versions switched to slf4j 2.x, that's where the problem starts to arise.
@markusstraub Do you happen to have a fix for this?
Not really, but I think in addition to log4j-slf4j-impl
you need to add a dependency to e.g. slf4j-simple
which will then contain a logging provider as the documentation states:
This can be solved by placing an SLF4J provider on your classpath, such providers include logback version 1.3.x and later, as well as one of slf4j-reload4j, slf4j-jdk14, slf4j-simple version 2.0.0 or later.
Thanks, it looks like the log4j-impl I'm using is being ignored. I'll have this resolved shortly.
Fixed. I'll release it now