[jboss-dev-forums] [JBoss AS 7 Development] - AS7 Logging
maxdib
do-not-reply at jboss.com
Fri Apr 27 07:23:17 EDT 2012
maxdib [https://community.jboss.org/people/maxdib] created the discussion
"AS7 Logging"
To view the discussion, visit: https://community.jboss.org/message/732657#732657
--------------------------------------------------------------
Hi All,
I know the AS7 logging issue has been discussed at length in this forum. But even after following the recommendations provided by the experts i am faced with the same issue where the application logs are still going to the server.log of AS7.
i have two spring applications (2 war files) deployed in a single JBOSS AS7 instance running in standalone mode.
And i have changed the jboss-deployment-structure.xml as below
*<jboss-deployment-structure>*
*<!--<ear-subdeployments-isolated>false</ear-subdeployments-isolated>-->*
* <deployment name="Test.war">*
* <exclusions >*
* <module name="org.apache.log4j" />*
* </exclusions>*
* </deployment>*
*</jboss-deployment-structure>*
for both the applications.
Also, i have put the log4j.properties of both the application war files in the their respective /WEB-INF/lib directory (as suggested in various other posts).
The contents of my log4j.properties file is as below: Similar configuration of log4j.properties for the other application.
But, when I start up the application both the application logs are written to the jboss server.log :(
------------------------------------------------------------------------------------------------------------------------------------------------
log4j.logger.com.test=DEBUG,logfile
log4j.logger.com.test.autopassj=DEBUG,autopasslogfile
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=../standalone/log/X.log
log4j.appender.logfile.MaxBackupIndex=20
log4j.appender.logfile.MaxFileSize=5MB
log4j.appender.logfile.Encoding=UTF-8
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c: %M: %L] - %m%n
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
# Autopass Log
log4j.appender.autopasslogfile.MaxBackupIndex=5
log4j.appender.autopasslogfile.MaxFileSize=5MB
log4j.appender.autopasslogfile.Encoding=UTF-8
log4j.appender.autopasslogfile.File=../standalone/log/AppLog.log
log4j.appender.autopasslogfile.layout.ConversionPattern=%d %p [%c: %M: %L] - %m%n
log4j.appender.autopasslogfile.layout=org.apache.log4j.PatternLayout
log4j.appender.autopasslogfile=org.apache.log4j.RollingFileAppender
# Spring Framework Log
log4j.logger.org.springframework=INFO,springLogfile
log4j.appender.springLogfile.File=../standalone/log/SpringFramework.log
log4j.appender.springLogfile.MaxBackupIndex=20
log4j.appender.springLogfile.MaxFileSize=5MB
log4j.appender.springLogfile.Encoding=UTF-8
log4j.appender.springLogfile.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.springLogfile.layout=org.apache.log4j.PatternLayout
log4j.appender.springLogfile=org.apache.log4j.RollingFileAppender
------------------------------------------------------------------------------------------------------------------------------------------------
Please any help in this direction will be really appreciated.
Thanks and Regards.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/732657#732657]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120427/77e304b1/attachment.html
More information about the jboss-dev-forums
mailing list