You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Hein Meling <me...@item.ntnu.no> on 2002/06/09 18:33:52 UTC

Re: Custom property for filepath in Config. file

Ciao,

  If you use the "ant" build tool, you can specify the -D options quite
easily in the build.xml file, and you wouldn't have to retype it for
every run.  See below for an example of passing -D options to an
application that can be started through an ant target, 'execdaemon'.

  Otherwise, there is always the System.setProperty() method that you
can use to set this stuff at runtime.  See javadoc in java.lang.System.

- Hein


<target name="execdaemon">
 <java classname="jg.ExecDaemon" fork="true" classpathref="run.path">
  <sysproperty key="jgroup.log.app" value="execdaemon"/>
  <sysproperty key="jgroup.log.dir" value="${log.dir}"/>
  <sysproperty key="jgroup.log.file.logging" value="${log.logging}"/>
  <sysproperty key="jgroup.log.file.pattern" value="${log.pattern}"/>
  <sysproperty key="jgroup.log.config" value="${log.config}"/>
 </java>
</target>


On Fri, 2002-06-07 at 14:57, Sridharan Vembu wrote:
> Hi,
> 
> Could anybody please guide on how to have a propertykey set to a value of the file destination in the configuration file. 
> 
> I mean, in the value for <param name = "File" value=${prop_key}/filename> . How can I define this in my configuration file or through my application.I dont want to use the -D option from the console.
> 
> Would highly appreciate your timely help.
> 
> Thanks & Regards
> Sridharan Vembu
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>