You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@logging.apache.org by Raghuveer <ra...@infotechsw.com> on 2007/12/27 06:11:45 UTC

Using Log4j in struts for application logs

 

Hello,

 

Question 1

I have placed "log4j.properties" in WEB-INF of my struts application.

With this application logs "test.log" is created in the directory.

I found in all the logs were created for java files in package
"com.testapp.test" to "test.log"

 

In addition to this there is one more log file created called "struts. log"

What I need to do to avoid the automatic creation of "struts.log"..i mean I
want only application related log file created...

 

 

poc\WEB-INF\src\log4j.properties

 

 

log4j.logger.com.testapp.test=debug, test

log4j.appender.test=org.apache.log4j.RollingFileAppender

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

log4j.appender.test.MaxFileSize=5000KB

log4j.appender.test.MaxBackupIndex=10

log4j.appender.test.layout=org.apache.log4j.PatternLayout

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n