blob: 083da269dcc1281007a5512b4a5822689740c3ae [file] [log] [blame]
<div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.5.&#160;Logging</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-10-Configuring-Addresses.html">Prev</a>&#160;</td><th align="center" width="60%">Chapter&#160;2.&#160;Configuring the Client</th><td align="right" width="20%">&#160;<a accesskey="n" href="JMS-Client-0-10-Miscellaneous.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-10-Configuring-Logging"></a>2.5.&#160;Logging</h2></div></div></div><p>The JMS Client logging is handled using the Simple Logging Facade for Java (<a class="link" href="http://www.slf4j.org/" target="_top">SLF4J</a>). As the name implies, slf4j is a facade that delegates to other logging systems like log4j or JDK 1.4 logging. For more information on how to configure slf4j for specific logging systems, please consult the slf4j documentation.</p><p>When using the log4j binding, please set the log level for org.apache.qpid explicitly. Otherwise log4j will default to DEBUG which will degrade performance considerably due to excessive logging. The recommended logging level for production is <code class="literal">WARN</code>.</p><p>The following example shows the logging properties used to configure client logging for slf4j using the log4j binding. These properties can be placed in a log4j.properties file and placed in the <code class="varname">CLASSPATH</code>, or they can be set explicitly using the <code class="literal">-Dlog4j.configuration</code> property.</p><div class="example"><a id="d0e2144"></a><p class="title"><strong>Example&#160;2.11.&#160;log4j Logging Properties</strong></p><div class="example-contents"><pre class="programlisting">
log4j.logger.org.apache.qpid=WARN, console
log4j.additivity.org.apache.qpid=false
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Threshold=all
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
</pre></div></div><br class="example-break" /></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-10-Configuring-Addresses.html">Prev</a>&#160;</td><td align="center" width="20%"><a accesskey="u" href="JMS-Client-0-10-Configuring.html">Up</a></td><td align="right" width="40%">&#160;<a accesskey="n" href="JMS-Client-0-10-Miscellaneous.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">2.4.&#160;Addresses&#160;</td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-0-10-Book.html">Home</a></td><td align="right" valign="top" width="40%">&#160;Chapter&#160;3.&#160;Miscellaneous</td></tr></table></div></div>