Hi, I don't think the log will go to system32 directory. Try something like
this

log4j.rootLogger=INFO, fatalconsole, file
                                      |
                  --------------------  
                 |  
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File=${catalina.home}/logs/lciponline_debug.txt
log4j.appender.file.DatePattern='.'yyyy-MM-dd
log4j.appender.file.Threshold=DEBUG


-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: November 23, 2004 10:14 AM
To: Tomcat Users List
Subject: RE: Logging and Deployment best practices



Hi,

>a) Convert my log4j.properties file to use a RollingFileAppender.  I

This is good.

>AppDirectory inside Parameters using the Registry Editor), I couldn't 
>figure out how to change the home directory for Tomcat running as a

Relying on the home directory is bad.

>logging; I'd rather use a relative path (something like ./logs) and 
>have the logs all end up in %TOMCAT_HOME%/logs.

Log4j configuration files can have environment variables in them, e.g.
${CATALINA_HOME}/logs/mylog.txt.  Alternatively, you could use programmatic
configuration instead of log4j.properties.

>b) Leave my log4j.properties file using ConsoleAppender and use a 
><Logger> element in my <Context> to have Tomcat put the output into a

This is also bad.  Loggers are gone in Tomcat 5.5.  I realize it might also
take 2 years for you to go from 5.0 to 5.5, just like it did from 4.1 to
5.0, but still it doesn't make sense to design something relying on <Logger>
at this point.

>+ Put all of the responsibility into the webapp using log4j?  If so -

Yes.  This maximizes portability, container-independence, and control for
you.

>how can I configure the home directory of Tomcat when I install the

You can, but shouldn't anyways.  Forget about any design based upon a "home
directory" or "current working directory" location.

>Service?  Or should I hardwire some other location for the logs?

You can, but don't have to.  If you have a logging directory for everything
running on the production server, you can hard-wire that.

Yoav Shapira http://www.yoavshapira.com




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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


!DSPAM:41a35416244686896713316!

Reply via email to