how can i disable all log from jforex api

i have tried "log4j.rootLogger=OFF"(log4j.properties under the directory "rc")
but that is not working at all

those log are really annoying me, tks

Translate to English Show original

orto leave comments

Answers: 1

Best Answer

One way to do that is to use SLF4J NOP logger instead of the default one:

https://mvnrepository.com/artifact/org.slf4j/slf4j-nop

Translate to English Show original
21 May 2018 by

i_hate_java avatar

hi thanks for the ans, since i am beginner on java, as my understand, maven project will auto download and update lib by the dependency setting of pom, so i added the following to pom
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-nop -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-nop</artifactId>
    <version>1.7.25</version>
    <scope>test</scope>
</dependency>
but the result are still same, did there any step i missed? tks a lot

al_dcdemo avatar

Try to exclude the default SLF4J logger by adding the below snippet to the dependency DDS2-jClient-JForex in pom.xml:

<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>

i_hate_java avatar

OMG, it work, thanks a lot

al_dcdemo avatar

Yw.

orto leave comments
Please log in or register to post answer.