-
Bug
-
Resolution: Done
-
Major
-
6.2.0.GA
-
None
We log request and response using com.sun.jersey.api.container.filter.LoggingFilter which uses java.util.logging.Logger . Application specific logs are getting printed with the below jboss-deployment-structure contents .
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j.jcl-over-slf4j" />
<module name="org.slf4j.impl" />
<module name="org.slf4j" />
<module name="org.slf4j.ext" />
<module name="org.apache.commons.logging" />
</exclusions>
Debugged a lot but couldnt figure out why jdk logging is going to jboss server.log rather than the appender configured in log4j.properties.
log4j.logger.com.sun.jersey.api.container.filter.LoggingFilter=INFO, RESTService
log4j.additivity.com.sun.jersey.api.container.filter.LoggingFilter=false
#requests to serve a log file
log4j.appender.RESTService=com.macys.mobile.framework.logging.log4j.v1216.AsynchronousRollingFileAppender
log4j.appender.RESTService.BufferSize=512
log4j.appender.RESTService.Blocking=true
log4j.appender.RESTService.File=$
/rest.log
log4j.appender.RESTService.DefaultConsoleThreshold=INFO
log4j.appender.RESTService.ConsoleThreshold=INFO
log4j.appender.RESTService.threshold=INFO
Maximum file size and no: of back up files can be configured as per the production environment requirement
log4j.appender.RESTService.MaxFileSize=100MB
log4j.appender.RESTService.MaxBackupIndex=10