I’m describing the obvious I guess. However it took me longer than expected. So for the occasional clueless (like me in 2 months time when I forgot this)
The Dynamusic 🙂 examples use console logging with debug message type. However if you use JBoss, setting GLOBAL.properties in DAS will not help you…..
JBoss logging is configured with log4j.xml in the atg server configuration. The entry:
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
</layout>
</appender>
Has loglevel INFO. So debug statements will not pass through. At first I thought to create a nucleus category with priority DEBUG. I haven’t looked it up in the Log4j docs, but it seems it is not possible to set logging priorities lower than the appender threshold. Sounds logical…
So changing the threshold
<param name="Threshold" value="DEBUG"/>
Will get the ATG debug statements through the console.
Adding
<category name="org.jboss">
<priority value="INFO"/>
</category>
Keeps all those JBoss debug statements out.