log4j - not logging anything
I'm trying to use log4j in a web application, but I'm kinda new to it so I probably made some stupid mistake somewhere. So I put the commons-logging and log4j jars in my WEB-INF/lib, and I put the following log4j.properties in my WEB-INF/classes:
log4j.rootLogger=ERROR, A1
log4j.logger.vermillion.web.struts.action=DEBUG, A
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.A=org.apache.log4j.FileAppender
log4j.appender.A.File=/opt/apache-tomcat-5.5.23/logs/vermillion.log
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - %m%n
My struts application is set up so that there is one central class (called "VermillionSupport" - it extends ActionSupport), which is in turn extended by several action classes. The central class does not have an execute() method; that's saved for the separate classes. All these classes are in the package vermillion.web.struts.action
In the central class, I initialize the logger like this (outside of any methods, so it should be initialized when struts instantiates the class):
protectedstatic Logger log = Logger.getLogger(VermillionSupport.class);
In the execute method of one of the sub-classes, I have the following code:
Login user = findUser(getTemp_login().getUsername(), getTemp_login().getPassword());
log.fatal("pie");
System.out.println("pie");
I'm 95% sure this code is getting executed - I have the following action mapping in my struts config file:
<action name="Login_*" method="{1}" class="vermillion.web.struts.action.LoginAction">
<result name="input">/Login.jsp</result>
<result name="cancel" type="redirect-action">Welcome</result>
<result type="redirect-action">MainMenu</result>
<result name="expired" type="chain">ChangePassword</result>
<exception-mapping
exception="vermillion.dao.ExpiredPasswordException"
result="expired"/>
<interceptor-ref name="guest"/>
</action>
and loading the page Login_input.do does indeed return /Login.jsp, as expected.
The file /opt/apache-tomcat-5.5.23/logs/vermillion.log does indeed get created...but nothing gets logged. Either there, or in catalina.out. I'm baffled.
Can anyone figure out what's going on?

