title: JBoss AS 7.1.1 Final and Log4j + Not working
body: <p>In my pom.xml, I added below dependency</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>And as suggested in jboss forum, i added below jboss-deployment-structure.xml under WEB-INF in war project.</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;/exclusions&gt;  
     &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt; 
  </code></pre>
  
  <p>But still server log is print, no application logs in my console.</p>
  
  <p>My log4j.properties in classpath has below setting.</p>
  
  <pre><code>log4j.rootLogger=DEBUG, consoleAppender, fileAppender
  
  # Redirect log messages to console
  log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender
  log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.consoleAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  
  # Redirect log messages to a log file, support file rolling.
  log4j.appender.fileAppender=org.apache.log4j.RollingFileAppender
  log4j.appender.fileAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.fileAppender.MaxFileSize=5MB
  log4j.appender.fileAppender.MaxBackupIndex=10
  log4j.appender.fileAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  log4j.appender.fileAppender.File=${jboss.server.base.dir}/log/wm/sample.log
  </code></pre>
  
  <p>Console log what i am getting is below</p>
  
  <pre><code>09:35:36,122 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015850: /C:/Mohan/Software/jboss-as-7.1.1.Final/standalone/deployments/wm.ear/wm-web-0.0.1-SNAPSHOT.war/WEB-INF/jboss-deployment-structure.xml in subdeployment ignored. jboss-deployment-structure.xml is only parsed for top level deployments.
  </code></pre>
  
  <p>Can somebody help me in pointing what am i missing in the above set?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Structure of my application is - Each will have its own pom.xml and parent will have common pom.xml. I have added all slf4j related dependency in war pom.xml.</p>
  
  <p>parent (pom.xml)<br>
    |<br>
    |__ear (pom.xml)<br>
    |<br>
    |__war (pom.xml)<br>
    |<br>
    |__test (pom.xml)   </p>