| 1. How do i specify a relative path to this file name, so that it can be
| created under j2ee/home/log/test.log. This j2ee/home may be under some
| other top level dir ?

Before log4j is configured, insert the application server home path in the
System properties, e.g.

System.setProperty( "j2ee.home", <path>" )

Then insert your relative part in another property

System.setProperty( "my.log.files", <relative path>" )

Now you can use Log4j's standard variable interpolation support in your
config file:

log4j.appender.R.File=${j2ee.home}/{my.log.files}/test.log

| 2. If i just specify any relative path in the property file, its not
| creating the log ?

It will, but (probably) relative to the System variable "user.dir".

--

Thomas





*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

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

Reply via email to