Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly unintentional inclusion of logging framework #20

Closed
salamanders opened this issue Jan 17, 2020 · 2 comments
Closed

Possibly unintentional inclusion of logging framework #20

salamanders opened this issue Jan 17, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@salamanders
Copy link

I'm newish to maven, but I don't think this is normally what is done:
from mvn dependency:tree

[INFO] +- ai.djl:examples:jar:0.2.1:compile
[INFO] |  +- commons-cli:commons-cli:jar:1.4:runtime
[INFO] |  +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.12.1:runtime
[INFO] |  |  +- org.apache.logging.log4j:log4j-api:jar:2.12.1:runtime
[INFO] |  |  \- org.apache.logging.log4j:log4j-core:jar:2.12.1:runtime

Because it gives off warnings like

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/ME/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.12.1/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/ME/.m2/repository/org/slf4j/slf4j-simple/1.7.30/slf4j-simple-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

All the other ai.djl:* dependencies look ok.

@salamanders salamanders added the bug Something isn't working label Jan 17, 2020
@frankfliu
Copy link
Contributor

frankfliu commented Jan 17, 2020

@salamanders
I'm not able to reproduce your error message with following command:

cd examples
mvn package -DskipTests
mvn exec:java -Dexec.mainClass="ai.djl.examples.inference.ObjectDetection"

And your maven dependency tree didn't show you have slf4j-simple included as well.

For the examples module, we only include log4j binding, I'm not sure how your slf4j-simple was added. Can you share your pom.xml file?

@frankfliu
Copy link
Contributor

@salamanders
Feel free to reopen this issue if you can reproduce it with our examples.

aksrajvanshi added a commit to aksrajvanshi/djl that referenced this issue Mar 18, 2021
Lokiiiiii pushed a commit to Lokiiiiii/djl that referenced this issue Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants