File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configuring log4j using env variables

 
Harjit Singh
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

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.

Thanks

- Harjit
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not aware of any functionality to do so in the Log4j API.
You can programmatically configure Log4j as described in the manual (scroll down to "configuration"). There's no reason you couldn't read environment variables to get those settings.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic