Konstantin, Thanks very much for the tips. VirtualWebappLoader worked perfectly. For the record, here's what worked for me:
META-INF/context.xml: <?xml version="1.0" encoding="UTF-8"?> <Context> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="${catalina.base}/virtualcp/my-webapp" /> </Context> Put logging.properties in $TOMCAT_HOME/virtualcp/my-webapp/logging.properties. Works like a charm. Thanks again! Dan On Tue, Oct 11, 2011 at 9:08 AM, Konstantin Kolinko <knst.koli...@gmail.com>wrote: > 2011/10/11 Dan Checkoway <dchecko...@gmail.com>: > > So... > > > > 1. Is it currently possible to do what I'm trying to do? Per-webapp > logging > > control without using WEB-INF/classes/logging.properties? I could really > > use a working example if this is doable. > > No it is not possible. > > What Pid wrote about the manager webapp is about applications that use > log methods in Servlet API. It does not concern those that use proper > logging libraries. > > > The suggestions that I have: > 1. Look at the org.apache.juli.ClassLoaderLogManager class. > > That is where configuration loading happens, and its > getProperty(String) method is what is actually used to access > individual values of those properties. > > It might be that it were possible to improve it. > > You can specify a different LogManager implementation when Tomcat starts. > > 2. It might be that VirtualWebappLoader class (in o.a.c.loader > package, see its Javadoc) could be used to add an external folder to > webapp classpath, so that logging.properties could be read from there. > > I have not tried it though. > > 3. The logging.properties file in the webapp can use any system > properties. Maybe you can use them to specify system-dependent values. > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >