I have the similar setup and works very well for me.

        log4j.appender.LOGFILE.File=outputfile.log where it is located? 
        where I find it? is it physical file?
It should be saved under the app. server bin dir like c:/tomcat-4.18/bin.
I don't use tomcat. But websphere app. server saves this file under bin
folder.
If you want, you can give absolute path like
c:/tomcat-4.18/logs/outputfile.log.

log4j.rootLogger=DEBUG, rolling
Here you have not declared stdout as an appender.
So, all log messages (because you have lowest level DEBUG for rootLogger)
will be sent to file declared in rolling appender.

You can include stdout in rootLogger like 
log4j.rootLogger=DEBUG, stdout, rolling
and check your tomcat log files to see if there is anything written before
you check 
rolling file permissions etc.

Hope this helps.

Reddy

> ----Original Message-----
> From: rablists [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 8:51 AM
> To:   [EMAIL PROTECTED]
> Subject:      common-logging, Struts, Log4j
> 
> 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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to