• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configuring log4j using env variables

 
Harjit Singh
Ranch Hand
Posts: 77
  • 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: 9340
10
Linux Mac OS X Windows
  • Likes 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic