RE: Trying to put logs under ${CATALINA_HOME}/logs/

2003-08-14 Thread Andy McBride
Hi,

Specifying ${catalina.base} or ${catalina.home} should work if you
started tomcat 
using bin\startup.bat file as this script converts the environment
variable CATALINA_HOME 
into a -D system property on the java command line.  

Log4J tries to resolve properties surrounded by ${ and } by calling
System.getProperty 
on the value.  This will not resolve environment variables, only java
properties specified using -D
See the javadoc on org.apache.log4j.helpers.OptionConvertor substVars
method for more details

If you start tomcat using the supplied windows shortcut which starts
using bin\bootstrap.jar no system 
Properties get set by default.

Hope this helps

Andy  

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 13 August 2003 16:55
To: Log4J Users List
Subject: RE: Trying to put logs under ${CATALINA_HOME}/logs/



Howdy,

log4j.appender.myAppender.File=c:/jakarta-tomcat-4.1.24/logs/my_log.txt

but this doesn't:

log4j.appender.myAppender.File=${CATALINA_HOME}/logs/my_log.txt

Did you try $CATALINA_HOME (on unix) or for your case %CATALINA_HOME%
since you're on NT?  The syntax with the curly braces is for Ant. You're
trying to access environment variables.

it would appear that it completely ignores the ${CATALINA_HOME}
variable,
which I have checked is defined. can anyone suggest a reason for this?
I
tried it with ${catalina.base} which i saw somewhere but that doesnt
work
either. And it doesnt like ${file.separator} either. I'm running winNT.

Same thing for file.separator, although I don't think that's always
defined as it is in java.

Yoav Shapira




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]


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



RE: Trying to put logs under ${CATALINA_HOME}/logs/

2003-08-14 Thread Tim Davidson
yeah, 

log4j.appender.myAppender.File=%CATALINA_HOME%/logs/my_log.txt

doesnt work either!

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 4:55 PM
To: Log4J Users List
Subject: RE: Trying to put logs under ${CATALINA_HOME}/logs/



Howdy,

log4j.appender.myAppender.File=c:/jakarta-tomcat-4.1.24/logs/my_log.txt

but this doesn't:

log4j.appender.myAppender.File=${CATALINA_HOME}/logs/my_log.txt

Did you try $CATALINA_HOME (on unix) or for your case %CATALINA_HOME%
since you're on NT?  The syntax with the curly braces is for Ant.
You're trying to access environment variables.

it would appear that it completely ignores the ${CATALINA_HOME}
variable,
which I have checked is defined. can anyone suggest a reason for this?
I
tried it with ${catalina.base} which i saw somewhere but that doesnt
work
either. And it doesnt like ${file.separator} either. I'm running winNT.

Same thing for file.separator, although I don't think that's always
defined as it is in java.

Yoav Shapira




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]



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