Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>to set my log4j in the classpath correctly i did 2 things :</p> <p>1) I set the name of the log4j to use like this </p> <pre><code>-Dlog4j.configuration=fox-log4j.xml </code></pre> <p>this one has to be in the <code>CLASSPATH</code></p> <p>2) I call the logging manager explicitly otherwise the jboss log4j wont work</p> <p>this gives in my run.conf :</p> <pre><code>#parameter used by the JVM and call later in the log4j.xml LOG_FOLDER=$DIRNAME/../server/default/log #jvm options JAVA_OPTS="-Xms256m -Xmx4096m -XX:MaxPermSize=1024m -Dlog4j.configuration=fox-log4j.xml \ -Dfile.encoding=UTF-8 -Dfile.io.encoding=UTF-8 -DjavaEncoding=UTF-8 -Djboss.platform.mbeanserver \ -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl \ -Djava.util.logging.manager=org.jboss.logmanager.LogManager \ -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl \ -DLOG_FOLDER=$LOG_FOLDER" </code></pre> <p>now a piece of my log4j :</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt; &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"&gt; &lt;appender name="FOX_LOG" class="org.apache.log4j.RollingFileAppender"&gt; &lt;param name="Threshold" value="DEBUG"/&gt; &lt;param name="Append" value="true"/&gt; &lt;param name="MaxFileSize" value="25MB"/&gt; &lt;param name="MaxBackupIndex" value="5"/&gt; &lt;param name="File" value="${LOG_FOLDER}/fox.log"/&gt; &lt;layout class="org.apache.log4j.PatternLayout"&gt; &lt;param name="ConversionPattern" value="%d{ISO8601} %-15x %t %-5p %-50.50c{1} - %m%n"/&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;category name="com.mycompany" additivity="true"&gt; &lt;priority value="DEBUG"/&gt; &lt;appender-ref ref="FOX_LOG"/&gt; &lt;/category&gt; &lt;root&gt; &lt;priority value="INFO"/&gt; &lt;appender-ref ref="FILE"/&gt; &lt;/root&gt; &lt;/log4j:configuration&gt; </code></pre> <p>hope this could help. regards</p>
    singulars
    1. This table or related slice is empty.
    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.
    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