opencog / relex

English Dependency Relationship Extractor
http://wiki.opencog.org/w/RelEx
Apache License 2.0
85 stars 68 forks source link

#100 Use SLF4J as logging API (+Logback) #265

Closed stellarspot closed 6 years ago

stellarspot commented 6 years ago
stellarspot commented 6 years ago

When running relex with ant the debug messages is shown even it is disabled in logback xml: ant run

There are a lot of messages like:

     [java] link-grammar: Info: JNI: dictionary language 'en' version 5.5.0
     [java] Info: Using file defined in wordnet.configfile:data/wordnet/file_properties.xml
     [java] 17:58:24.527 [main] INFO relex.algs.AlgorithmApplier - Info: Using relex algorithms file defined in relex.tagalgpath: data/relex-tagging.algs
     [java] 17:58:24.531 [main] DEBUG relex.algs.AlgorithmApplier - Info: Adding alg: SUBSCR_POS_A
     [java] 17:58:24.532 [main] DEBUG relex.algs.AlgorithmApplier - Info: Adding alg: SUBSCR_POS_A-C

Even the log level is set to INFO in the logback.xml file and the message format is different.

It seems that it is only a local ant problem when running it with the logback.

When running relex using just java all works as expected and the debug messages are not shown.

stellarspot commented 6 years ago

I found the problem why ant run does not find the logback.xml. It was because I have not added the logback.xml copying in build.xml from resource during the project building. I updated the build.xml to copy the logback.xml now.

stellarspot commented 6 years ago

I also add using the same logger by both Server and ServerSession class because before the Server class sets its own verbose flag to the ServerSession class.

linas commented 6 years ago

I guess this seems reasonable to me, and seems mergeable unless @vsbogd has any other comments to make.

vsbogd commented 6 years ago

I am fine with current state, no other comments, thanks!