I am writing a Java application in IntelliJ and I am using log4j. I disabled the console output from the xml file, but it keeps outputting when I run the jar (not the java, the JAR). I use this repository for some experiments: https://github.com/optimaize/language-detector
I have already tried to add log4j.properties and different configurations of log4j.xml, but it keeps outputting the console information. This one is my log4j.xml file located at: src/main/resources/log4j.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false" xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="maxFileSize" value="10MB" />
<param name="maxBackupIndex" value="10" />
<param name="file" value="C:/logs/myStruts1App.log" />
</appender>
<root>
<level value="INFO" />
<appender-ref ref="file" />
</root>
</log4j:configuration>
According to other guides here on stack overflow, this should make it. But when I run the jar: java -jar MyJar.jar
it outputs
17:20:41.017 [main] DEBUG c.o.langdetect.LanguageDetectorImpl - ==> [DetectedLanguage[bn:0.9999940935958097]]
17:20:41.019 [main] DEBUG c.o.langdetect.LanguageDetectorImpl - ==> [DetectedLanguage[bn:0.9999940935958097]]
17:20:41.020 [main] DEBUG c.o.langdetect.LanguageDetectorImpl - ==> [DetectedLanguage[en:0.9999940935958097]]
17:20:41.020 [main] DEBUG c.o.langdetect.LanguageDetectorImpl - ==> [DetectedLanguage[fr:0.9999940935958097]] ...