File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
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.
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
How To Ask Questions On JavaRanch
It is sorta covered in the
JavaRanch Style Guide
subject: configuring log4j using env variables
Third party libraries and WSAD 5.1.0
How can I get OS environment variables in log4j
Path to locate properties file of log4j
log4j error message - please send solutions
log4j - different log file based on Threshold value
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014