logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Farrow <marc.far...@gmail.com>
Subject Re: specify the relative directory to log
Date Wed, 06 May 2009 13:47:32 GMT

You will have to read the documentation and see how stuff is loaded and
whether or not it is possible.  I remember seeing a page that specifically
listed the order in which LOG4J tries to search for configuration files.  So
you MIGHT be able to do this.  Allow LOG4J to load the configuration file
and then "change" a property at run-time, but I would not know if you can
are not.  If you check the documentation, I am sure you will be able to find
your answer.



Luca Ferrari wrote:
> 
> On Wednesday 06 May 2009 03:04:59 pm Marc Farrow's cat walking on the
> keyboard 
> wrote:
>> I am not sure what the problem is, because the example I posted was
>> totally
>> in the program and not in a properties file.
> 
> Sorry, allow me to explain it better. I've got an application with its
> log4j 
> configuration file, where there is specified a log directory that is
> relative. I 
> want to transform such log path absolute, because I could install and run
> the 
> application from several paths, but I want the logs to be stored always in
> the 
> same folder. Such folder must be computed the first time the application
> is 
> started, and therefore I cannot specify such absolute path into the log4j
> file. 
> That's why I'd like to keep the log4j configuration file with the relative
> path 
> and transform such path absolute at run-time.
> 
> Luca
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/specify-the-relative-directory-to-log-tp23387448p23407033.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Mime
View raw message