Configuring Log4J from system property in web application on JBoss 7

I needed to implement a web application using Spring MVC that would be portable (as much as possible) across servlet containers and application servers. I used SLF4J for logging with Log4J as implementation and wanted the logging to be independent from the hosting container. We used Puppet to automate configuration management and deployment. Hence came the requirement to allow the (dev)op guys to configure the logging with an external file that is not embedded in the final WAR file.

Continue reading