Hi everyone,
I am new to log4j and i was hoping to get some help with setting it up on a unix machine.
I have deployed my web service to the, tomcat5.5-webapps/axis/WEB-INF/classes directory.
I have stored the log4jxxx.jar file in a location where my CLASSPATH is pointing.
My log4j properties file looks like the following,
Within my class code i have the following,Code:log4j.appender.rollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.rollingFile.File=/usr/share/tomcat5.5-webapps/axis/WEB-INF/classes/com/test/play/perimeter/mylog.log
log4j.appender.rollingFile.MaxFileSize=2MB
log4j.appender.rollingFile.MaxBackupIndex=2
log4j.appender.rollingFile.layout = org.apache.log4j.PatternLayout
log4j.appender.rollingFile.layout.ConversionPattern=%p %t %c - %m%n
Code:import org.apache.log4j.Logger;
...
public class Perimeter_Game implements com.test.play.perimeter.Perimeter{
...
private static Logger logger = Logger.getLogger(Perimeter_Game.class);
Within one of my methods called from the webapp client,
Code:logger.info("this is a sample log message.");
My main questions are,
1. What directory does the .properties file need to be in?
2. Are there any problems with the above?
Im currently not seeing a logfile created in the directory i specify above.
Thankyou.
colpwd
