I using common logging and jboss eap 6.2 in java application, log file is creating but empty and hibernate log also not working.
This is my jboss-deployment-structure.xml
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
</exclusions>
</deployment>
<sub-deployment name="abc.war">
<exclusions>
<module name="org.apache.log4j"/>
<module name="org.apache.commons.logging"/>
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
and this is my log4j.properties
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
and add JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.as.logging.per-deployment=false" in standalone.conf of jboss eap 6.2.
I got the answer, my log4j is working.
1) I create the module in my jboss eap 6.2 GA
jboss_home/modules/com
module is
log4j/mylog4j/main
in main folder putted the
module.xml
file andlog4j-1.2.16.jar
module.xml
2) Add the single line code at end file
standalone.conf
which is inJBOSS_HOME/bin
3) Create the
jboss-deployment-structure.xml
in myMETA_INF
of ear4) Putted
log4j.properties
in my class path5) Add dependencies in
pom.xml
It is enough for my log4j configuration.