Note that there are some explanatory texts on larger screens.

plurals
  1. POJBoss AS 6 - the log4j configuration
    primarykey
    data
    text
    <p>I have migrated from <code>JBoss 4.2.3</code> to <code>JBoss AS 6</code>. On the <code>JBoss 4.2.3</code> I had configured <code>log4j</code> to output some logs in different files using <code>log4j.properties</code>. The current logging (on JBoss AS 6) doesn't output anything but the default <code>server.log</code> and <code>boot.log</code>. Please help me find why I don't get the other logs.</p> <p>Here is my project structure: </p> <pre><code>/src `--log4j.properties /META-INF `--jboss-deployment-structure.xml /lib (added to classpath) `--log4j.jar </code></pre> <p>I added the <code>jboss-deployment-structure.xml</code> after the migration due to reading I found on that issue. Unfortunately this doesn't worked for me. Here are the configurations: </p> <p><strong>jboss-deployment-structure.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;jboss-deployment-structure&gt; &lt;deployment&gt; &lt;exclusions&gt; &lt;module name="org.apache.log4j" /&gt; &lt;module name="org.jboss.logging" /&gt; &lt;module name="org.jboss.logmanager" /&gt; &lt;module name="org.jboss.log4j.logmanager" /&gt; &lt;/exclusions&gt; &lt;/deployment&gt; &lt;/jboss-deployment-structure&gt; </code></pre> <p><strong>log4j.properties</strong> </p> <pre><code># Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=DEBUG, CONSOLE, LOGFILE # Set the enterprise logger category to FATAL and its only appender to CONSOLE. #log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE # Categories log4j.category.org.hibernate=INFO log4j.category.org.hibernate.SQL=DEBUG # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=DEBUG log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=[%F-&gt;%M() line%L] %d{dd-MM-yyyy HH:MM:ss} - %m%n log4j.appender.CONSOLE.Encoding=ISO-8859-1 # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.Append=false log4j.appender.LOGFILE.File=${jboss.server.home.dir}/log/cache.log log4j.appender.LOGFILE.Threshold=DEBUG log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n log4j.appender.LOGFILE.Encoding=ISO-8859-1 # AspectJ time logger log4j.logger.TimeLog=DEBUG, timeLog, CONSOLE log4j.additivity.TimeLog=false log4j.appender.timeLog=org.apache.log4j.FileAppender log4j.appender.timeLog.File=${jboss.server.home.dir}/log/time.log log4j.appender.timeLog.Threshold=DEBUG log4j.appender.timeLog.layout=org.apache.log4j.PatternLayout log4j.appender.timeLog.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %c %m%n log4j.appender.timeLog.Encoding=ISO-8859-1 </code></pre> <p>The time logger is my custom logger that is why it has a bit different configuration. </p> <p><strong>P.S.</strong> And please don't tell me that my mistake is that I am using version 6 of JBoss.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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