I am trying a small application everything works fine except the logging.... I used the following code...
log4j.rootLogger=ALL, stdout
log4j.appender.stdout=org.apache.log4j.RollingFileAppender
log4j.appender.stdout.File=C:\Program Files\apache-tomcat-6.0.18\logs\struts-example-log.log
log4j.appender.stdout.MaxFileSize = 100KB
log4j.appender.stdout.MaxBackupIndex = 1
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} - %p %c - %m%n
And in my action I am using the code...
private static Log log = LogFactory.getLog("com.ex.actions.LogonAction");
and using log as:
log.debug("Login successful!!");
And I put the log4j.jar in WEB-INF\lib.
I was expecting that it would create a log file in the specified location and write to it. But it did not.
I tried creating an empty log file in that location but no use :-(
I am trying to deploy on
tomcat server. Can anyone tell me where I am doing wrong.
Also does it matter where the file logging.properties file is placed?
Am I missing something? I will be thankful if anyone can help me.. Thanks in advance
--Srik.