In the current CVS HEAD (see
http://issues.apache.org/jira/browse/LOGCXX-76), I've emulated a couple
of the Java properties (java.io.tmpdir, user.home, user.dir) that can
now be used in both log4j and log4cxx for providing a base for file
specifications. The real missing one is the directory of the current
configuration file which one might assume would be used to resolve
relative paths included in configuration files, but isn't. See
http://marc.theaimsgroup.com/?l=log4j-dev&m=110992261803810&w=2 for
comments on log4j on this. I'd expect that I may introduce
"${base.dir}" in both log4j and log4cxx to represent it and likely
change the default resolution for new namespace XML configuration
files.
The syntax for property expansion is ${propname}, so you can do:
log4j.appender.D3.File=${user.home}/mylogfile
You could also use environment variables (log4cxx only):
log4j.appender.D3.File=${LOG_BASE}/mylogfile