You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New pomegranate uses new maven-resolver (aether) which uses slf4j-api for logging:
Downloading https://github.com/boot-clj/boot/releases/download/2.8.0-SNAPSHOT/boot.jar...
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.
This means that when it tries to log, it will check if classpath contains any logger implementations. We can't safely add new implementations as it is probably that users do that themselves, and having multiple loggers also causes warning.
Maybe we'll need code to check project deps and only add logger if there isn't one
Or maybe slf4j-api has some method to check if logger is available... and then we can inject logger... if we can do that before it prints the warning, it would probably be most robust solution
If we can manage to run code before Maven-resolver classes are loaded, we can use java.util.ServiceLoader.load to check for SLF4JServiceProvider and if none is found, add nop/simple logger to classpath
The text was updated successfully, but these errors were encountered:
New pomegranate uses new maven-resolver (aether) which uses slf4j-api for logging:
This means that when it tries to log, it will check if classpath contains any logger implementations. We can't safely add new implementations as it is probably that users do that themselves, and having multiple loggers also causes warning.
Though Maven itself seems to include logger: http://maven.apache.org/ref/3.2.2/maven-embedder/logging.html Might be worth to investigate more on how they prevent warnings.
Some notes from Slack:
Maybe we'll need code to check project deps and only add logger if there isn't one
Or maybe slf4j-api has some method to check if logger is available... and then we can inject logger... if we can do that before it prints the warning, it would probably be most robust solution
https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java#L149
If we can manage to run code before Maven-resolver classes are loaded, we can use
java.util.ServiceLoader.load
to check forSLF4JServiceProvider
and if none is found, add nop/simple logger to classpathThe text was updated successfully, but these errors were encountered: