Page 1 of 1

disable all log infos

PostPosted: Tue Nov 27, 2012 11:31 pm
by ricofernandes
Hi, I want to disable all log infos. I've already configured jboss-logx4j.xml (using JBoss as the application server) and most of the infos have already disappeared, but some of them continue appearing. Does anybody know what am I missing? Here is my config file:

<category name="org.docx4j">
<priority value="ERROR"/>
</category>

<category name="org.docx4j.jaxb">
<priority value="ERROR"/>
</category>

<category name="org.docx4j.document.wordprocessingml">
<priority value="ERROR"/>
</category>

<category name="org.docx4j.openpackaging">
<priority value="ERROR"/>
</category>
<category name="org.docx4j.openpackaging.io">
<priority value="ERROR"/>
</category>
<category name="org.docx4j.openpackaging.packages">
<priority value="ERROR"/>
</category>
<category name="org.docx4j.openpackaging.parts">
<priority value="ERROR"/>
</category>
<category name="org.docx4j.fonts">
<priority value="ERROR"/>
</category>

Re: disable all log infos

PostPosted: Wed Nov 28, 2012 8:47 pm
by jason
Code: Select all
<category name="org.docx4j">
<priority value="ERROR"/>
</category>


should be doing it.

What messages are you still getting?

Re: disable all log infos

PostPosted: Wed Dec 12, 2012 7:15 am
by hpeng
I use following in code which works for me.

Code: Select all
   public static void init() {
      Docx4jProperties.getProperties().setProperty("docx4j.Log4j.Configurator.disabled", "true") ;            
      Logger.getLogger("org.apache.commons").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.jaxb").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.document.wordprocessingml").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.openpackaging").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.openpackaging.io").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.openpackaging.packages").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.openpackaging.parts").setLevel(Level.OFF);
      Logger.getLogger("org.docx4j.fonts").setLevel(Level.OFF);
      Logger.getRootLogger().setLevel(Level.OFF);
   }