Note that there are some explanatory texts on larger screens.

plurals
  1. POJBoss 7 - how to configure the logging of my application on the jboss server
    text
    copied!<p>Currently my web application (Jboss 7.1.1, Hibernate 3.6.9, Spring 3.0.1) used log4j for logging.</p> <p>log4j.xml: </p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; </code></pre> <p> </p> <pre><code>&lt;appender name="application" class="org.apache.log4j.DailyRollingFileAppender"&gt; &lt;param name="file" value="${jboss.server.log.dir}/my.log" /&gt; &lt;param name="DatePattern" value="'.'yyyy-MM-dd" /&gt; &lt;layout class="org.apache.log4j.PatternLayout"&gt; &lt;param name="ConversionPattern" value="%d{ABSOLUTE}|%5p|%c{1}:%L|%X{ipAddress}|%X{deviceId} - %m%n" /&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;appender name="duration" class="org.apache.log4j.DailyRollingFileAppender"&gt; &lt;param name="file" value="${jboss.server.log.dir}/my-duration.log" /&gt; &lt;param name="DatePattern" value="'.'yyyy-MM-dd" /&gt; &lt;layout class="org.apache.log4j.PatternLayout"&gt; &lt;param name="ConversionPattern" value="%d{ABSOLUTE}|%5p|%c{1}:%L|%X{ipAddress}|%X{deviceId} - %m%n" /&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;logger name="com.my"&gt; &lt;level value="debug" /&gt; &lt;/logger&gt; &lt;logger name="com.my.xx.PerformanceLogger" additivity="false"&gt; &lt;level value="info" /&gt; &lt;appender-ref ref="duration" /&gt; &lt;/logger&gt; &lt;root&gt; &lt;priority value="error" /&gt; &lt;appender-ref ref="application" /&gt; &lt;/root&gt; </code></pre> <p></p> <p>This is working but now I must switch to server configured logging. How can I do this? Already tried out on JBoss Application Server console adding my handlers (core/logging/handler --> add) and afterwards defined logger categories. But this defined log files misses all(?) logger information from classes where I used:</p> <pre><code> private static final Logger LOGGER = Logger .getLogger(MyClass.class); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload