Hi Guys,

I am trying to make the switch to Struts2 for an upcoming project. However I have run into one annoying problem. I am using GlassFish 2.1 and keep getting logs messages from Struts 2 in the server.log instead of the app specific log myapp.log. This is despite having configured log4j to the contrary.

The weird thing is that I am getting the debug messages from my custom classes in the myapp.log.

I have the following log4j.properties:

# Set root logger level to WARN and append to R
log4j.rootLogger=WARN, R


# ***** R is set to be a RollingFileAppender.
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/myapp.log
# ***** Max file size is set to 100KB
log4j.appender.R.MaxFileSize=100KB
# ***** Keep one backup file
log4j.appender.R.MaxBackupIndex=1
# ***** R uses PatternLayout.
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] %C{5} (%F:%L) - %m%n

# OpenSymphony Stuff
log4j.logger.com.opensymphony=INFO
log4j.logger.org.apache.struts2=DEBUG

# Spring Stuff
log4j.logger.org.springframework=INFO

# My custom classes
log4j.logger.com.mydomain=DEBUG


I also have log4j-1.2.15.jar in the WEB-INF/lib folder.


Am I missing something obvious here? Do you need to do anything else for Struts 2?

Thanks,
Carl.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to