Hi. I have problem in using the common-logging with struts and
Log4j. I am basically lost. I have short questions, I appreciate if
anyone can help me little bit. these are the questions with examples:
The file outputfile.log that I specify in
log4j.appender.LOGFILE.File=outputfile.log where it is located?
where I find it? is it physical file?
I dont know why my configuration is not working, although I put the
following files in the classpath WEB-INF/classes/org/myclasses/:
commons-logging.properties:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JL
ogger
log4j.properties:
log4j.rootLogger=DEBUG, rolling
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%
n
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=outputfile.log
log4j.appender.rolling.MaxFileSize=100KB
log4j.appender.rolling.MaxBackupIndex=1
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - %p %
c - %m%n
What else should I specify, or configure to make it to work? I have
log4j-1.2.4.jar in my WEB-INF/lib/
Should I set any system propreties? or web.xml? or struts-config?
In my classes I am doing that:
protected static final org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(this.class);
if (log.isDebugEnabled())
log.debug("getMessage(" + locale + "," + key + ")");
(How can I enable/disable the Debug or Trace?)
Thank you in advance. I am really stuck and I couldnt make it to
work. I am using tomcat 4.18
Rabih
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]