On Wednesday 06 May 2009 04:00:48 pm Peter Walter's cat walking on the 
keyboard wrote:
> Hello Luca,
>
> you can solve this via a system property.
>
> When you specify your log file like this:
>
> log4j.appender.LOGFILE.File=${log4j.logpath}/logfile.log
>
> Log4J replaces ${log4j.logpath} with the system property log4j.logpath
> (at least thats what happens in log4j 1.2.15 when using configuration
> via properties file - I'm not perfectly sure about other versions or XML
> config, but i would guess that to work similar there).
>
> Now you just have to set the system property via
>
> System.setProperty("log4j.logpatch", pathToLog);
>


Thanks, it works even with the XML configuration file.
Very useful!

Thanks,
Luca

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to