Since the app server first configures logging and at a later point of time does the jndi
bindings, i don't think you will be able to lookup the object from JNDI when the log4j
is being initialized.
I guess, you could try packaging your own log4j.xml inside you application and then use
your custom class in that xml file. This way, by the time your log4j.xml is loaded (when
you application is deployed and accessed) the JNDI bindings will be done. You might want
to see this post to understand how you can package the log4j.xml in your app
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=128979#4...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203656#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...