Afternoon,
I have a log4j problem with a webapp deployed in jboss.
My webapp has a bean called Pound which when initialised creates a org.jboss.logging.Logger instance and then tries logging at all the log levels.
Although in my log4j.xml config file I have something which says anything under com.companyx should not log anything under the WARN level. But the Pound class still does. The other category configs dont work either (even when others are commented out).
Am I missing a trick or something? Samples below -
Java File
package com.companyx.money; import org.apache.log4j.*; class Pound { public Pound() { // Setup logger org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Pound.class); // Try various log levels log.debug("DEBUG"); log.info("INFO"); log.warn("WARN"); log.error("ERROR"); log.fatal("FATAL"); } }
<!-- My preference --> <category name="com.companyx"> <priority value="WARN"/> </category> <category name="com.companyx.money"> <priority value="WARN"/> </category> <category name="Pound"> <priority value="WARN"/> </category>