Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing application's Log4J configuration under JBoss 7.1.1
    primarykey
    data
    text
    <p>I'm am having trouble logging using my appenders defined on my XML log4j configuration file.</p> <p>I created the <strong>jboss-deployment-structure.xml</strong> on my EAR's META-INF folder with no sucess.</p> <p>The <strong>jboss-deployment-structure.xml</strong> structure is:</p> <pre><code>&lt;jboss-deployment-structure&gt; &lt;ear-subdeployments-isolated&gt;false&lt;/ear-subdeployments-isolated&gt; &lt;deployment&gt; &lt;exclusions&gt; &lt;module name="org.apache.log4j" slot="main"/&gt; &lt;/exclusions&gt; &lt;/deployment&gt; &lt;/jboss-deployment-structure&gt; </code></pre> <p>I have even tried to edit my <strong>standalone.conf.bat</strong> file adding the following line:</p> <pre><code>set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.as.logging.per-deployment=false" </code></pre> <p>My application deployment is like this:</p> <pre><code>-&gt; MyAppEAR.ear -&gt; META-INF -&gt; MANIFEST.MF -&gt; MyAoo.war -&gt; META-INF -&gt; MANIFEST.MF -&gt; jboss-deployment-structure.xml -&gt; WEB-INF -&gt; web.xml -&gt; lib -&gt; log4j-1.2.17.jar -&gt; --- -&gt; classes -&gt; log4j.xml -&gt; ... </code></pre> <p>I've noticed the following error:</p> <ul> <li><strong>jboss-deployment-structure.xml in subdeployment ignored. jboss-deployment-structure.xml is only parsed for top level deployments.</strong></li> </ul> <p>I even tried migrating from JBOSS 7.1.0 to 7.1.1</p> <p>Some help please!</p> <p>Thanks</p> <hr> <p>Thanks for the repply James.</p> <p>I did what you said and moved the <strong>jboss-deployment-structure.xml</strong> file to <strong>MyAppEAR.ear/META-INF</strong>.</p> <p>I've noticed that this way the exception:</p> <pre><code>jboss-deployment-structure.xml in subdeployment ignored. jboss-deployment-structure.xml is only parsed for top level deployments. </code></pre> <p>... doesn't occur. I don't know if that means that the file was parsed... how can I tell?</p> <p>Despite of this new behaviour my <strong>log4j.xml</strong> configuration file still isn't loaded and the logger used still is Log4J's.</p> <p>I know this becaused I wrote to the console:</p> <pre><code>System.out.println(Logger.getRootLogger().getClass().toString()) </code></pre> <p>...and got:</p> <pre><code>class org.jboss.logmanager.log4j.BridgeLogger </code></pre> <p>I've also tried:</p> <ul> <li>moving my <strong>log4j.xml</strong> to <strong>MyAppEAR.ear/META-INF</strong>.</li> <li>removing the unecessary <strong>-Dorg.jboss.as.logging.per-deployment=false</strong> from <strong>standalone.conf.bat</strong></li> <li>removing <strong>slot</strong> from my <strong>jboss-deployment-structure.xml</strong></li> </ul> <p>Any more ideas?</p> <p>Thanks</p>
    singulars
    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