Log4j not working <p>I using common logging and jboss eap 6.2 in java application, log file is creating but empty and hibernate log also not working.</p> <p>This is my jboss-deployment-structure.xml</p> <pre><code>&lt;jboss-deployment-structure&gt; &lt;deployment&gt; &lt;exclusions&gt; &lt;module name="org.apache.commons.logging"/&gt; &lt;module name="org.apache.log4j"/&gt; &lt;/exclusions&gt; &lt;/deployment&gt; &lt;sub-deployment name="abc.war"&gt; &lt;exclusions&gt; &lt;module name="org.apache.log4j"/&gt; &lt;module name="org.apache.commons.logging"/&gt; &lt;/exclusions&gt; &lt;/sub-deployment&gt; &lt;/jboss-deployment-structure&gt; </code></pre> <p>and this is my log4j.properties</p> <pre><code>log4j.rootLogger=DEBUG, FILE log4j.appender.FILE=org.apache.log4j.RollingFileAppender log4j.appender.FILE.File=c\:\\log\\eSocietySQLLog.log log4j.appender.FILE.ImmediateFlush=true log4j.appender.FILE.Threshold=debug log4j.appender.FILE.Append=true log4j.appender.FILE.MaxFileSize=10MB log4j.appender.FILE.MaxBackupIndex=5 log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %c %n%m%C log4j.appender.FILE.DatePattern='.' yyyy-MM-dd-a </code></pre> <p>and add JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.as.logging.per-deployment=false" in standalone.conf of jboss eap 6.2.</p>