A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
Java in General
configuring log4j using env variables
Joined: Feb 01, 2007
Apr 28, 2008 12:44:00
Is there any way to configure the log4j file using environement variables. We don't want to hard code the path in the log4j configuration file.
Joined: Oct 29, 2001
Apr 29, 2008 08:20:00
I'm not aware of any functionality to do so in the Log4j API.
You can programmatically configure Log4j as described in the
(scroll down to "configuration"). There's no reason you couldn't read environment variables to get those settings.
How To Ask Questions On JavaRanch
I agree. Here's the link:
subject: configuring log4j using env variables
Third party libraries and WSAD 5.1.0
log4j error message - please send solutions
log4j - different log file based on Threshold value
How can I get OS environment variables in log4j
Path to locate properties file of log4j
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015