logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Davidson" <tim.david...@greenhatconsulting.com>
Subject RE: Trying to put logs under ${CATALINA_HOME}/logs/
Date Wed, 13 Aug 2003 16:21:27 GMT
OK this is working!

 log4j.appender.myAppender.File=${catalina.base}/logs/my_front-end_log.txt

Thanks for your help.

-----Original Message-----
From: Andy McBride [mailto:andy.mcbride@pcmsgroup.com]
Sent: Wednesday, August 13, 2003 5:12 PM
To: 'Log4J Users List'
Subject: RE: Trying to put logs under ${CATALINA_HOME}/logs/


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:Yoav.Shapira@mpi.com] 
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: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message