Chris, yes I did. The code below was meant to be a simplified example. I created a bug report on that in the meantime: https://issues.apache.org/bugzilla/show_bug.cgi?id=48716
As far I understand now, once the default LogManager of the JDK got used (i.e. by retrieving a logger or setting defaul logging config), LogManager.getLogManager() will consistently return that LogManager implementation and never JULI's. JULI however calls LogManager.getLogManager().reset() as a side effect of a context stop() (e.g. when removing an app from tomcat) so that all JDK logging config gets reset :-( I understand that the intention of JULI is to only reset the configuration associated with the WebappLoader and it does so, once it had its own LogManager implementation registered. When embedding tomcat and using JDK Logging that is however almost certainly not the case. If you are involved with JULI, you might be able to provide a good solution. I thought testing whether the current LogManager is indeed JULI's before calling reset could be a remedy. But as I don't know JULI by heart, there might be other problems in that. Thanks, Henning On Tue, 2010-02-09 at 17:37 -0500, Christopher Schultz wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Henning, > > On 2/7/2010 6:26 PM, Henning Blohm wrote: > > I am using JDK logging and I would like to make sure that Tomcat JULI > > does not modify logging runtime configuration that is not owned by > > tomcat or web apps running on tomcat. > > > > Here is what happens: > > > > When adding a standard context and removing it again, it seems that JULI > > resets or modifies otherwise the current logging configuration. > > > > For example: This code: > > > > <code> > > logger.setLevel(Level.INFO); > > logger.info("adding..."); > > StandardContext sc = addContext(c); > > logger.info("added"); > > System.out.println(logger.getLevel()); > > logger.info("removing..."); > > removeContext(c,sc); > > logger.info("removed"); > > System.out.println(logger.getLevel()); > > </code> > > Have you tried creating a separate ClassLoader for the purposes of > segregating Tomcat? IF you do that, it's likely that JULI won't reset > your Java logging configuration. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktx48MACgkQ9CaO5/Lv0PB0GgCfdcelHnlaJxHoKQJGj9ay3Xc2 > DSYAn1DbCvS2eFmn4JA/+KT3jKeiF3YB > =aSJk > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >