Page 1 of 1

docx4j 3.0 logging with logback

PostPosted: Thu Jan 16, 2014 10:41 am
by lochana
I have slfj and logback jars in the class path with the following logback.xml file (this file has been used successfully before) . However, docx4j 3.0 still prints logging information to the standard out. I am using Netbeans 7.4 to build the docx4j based application. I would like to change the logging level to error and send it to a log file. Not sure what I am missing. Any help is much appreciated.

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<pattern>%date [%level] %thread [%logger{50}] %msg%n</pattern>
<root level="debug">
<appender-ref ref="FILE" />

Re: docx4j 3.0 logging with logback

PostPosted: Sat Jan 18, 2014 5:08 pm
by lochana
I figured the issue has nothing to do with docx4j. One library jar (CDK 1.4.19) file had a version of sjf4j bundled in.
If you run into this situation add these lines and test your slf4j/logback configuration.

LoggerContext lc = (LoggerContext)LoggerFactory.getILoggerFactory();