I got help with this on the log4j list. Anyone looking to do something
similar should see the very simple solution proposed by Jacob Kjome in
http://marc.info/?l=log4j-user&m=119994026205291&w=2
It involves adding a dummy configuration file on the classpath and then
manually reconfiguring with the real file from within my application.
-- Scott
Scott Sauyet wrote:
I'm not sure exactly what my question is other than "Do you have any
suggestions?" :-(
I'm using a custom extension to log4j's FileAppender. I need to
configure this in a class that loads a separate properties file. It
took me a while to figure a way to do this so that my configuration
would run before any Wicket logging calls were done (more precisely,
before log4j's configuration is run.) But I managed to do it by running
that configuration in the init() of a separate servlet that loads before
Wicket's.
This works fine, but occasionally it would fail, and it took me quite
some time to determine the cause. The problem occurs if there is a
session containing a Wicket component. When the server tries to
reconstruct that component, there is a call to
LogFactory.getLog(Component.class), which eventually leads to log4j's
configuration running before my extra servlet has run.
Has anyone run into a similar situation, and did you find a good solution?
Thanks,
-- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]