This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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.