I have an application running on
JBoss and have decided to use log4j. I'm trying to set it up in such a way that I can maintain/control my own log4j setup/configuration in each application I create, separate from the JBoss log4j configuration. (I'd rather not have to update one big log4j.xml with each application I write. I'd rather control it in each application, if I choose to). I've found various things online, none of which I've been able to get working. The latest thing I've tried is a Log4jRepositorySelector a la
http://www.jboss.org/community/wiki/Log4jRepositorySelector .
I'm not getting any errors when my code runs, but I'm also not getting any log4j comments written to a separate application log (or anywhere, not even the server.log).
Any help getting this working, pointers on where I'm going wrong, or advice are welcome. Thanks!
This is the AppRepositorySelector class:
And the AppContextListener:
My web.xml has this in it beneath the display-name and description, but prior to my security-constraint (web.xml is in my WEB-INF folder):
This is my log4j.xml (also in the WEB-INF folder):
And finally, this is my 'controller' that attempts to use log4j:
Sorry this is so long but I wanted to get all my info in. Any ideas? Thanks!