| Mike Cannon-Brookes wrote:
> I've written a minor patch to allow users to configure logging
> themselves.
> 
> Basically instead of :
> 
> PropertyConfigurator.configure(classLoader.getResource("webwork/log4j.properties"));
> 
> in ServletDispatcher - allow the user to set two init parameters
> (mutually exclusive) - log4j-xml-config and log4j-properties-config
> 
> if (config.getInitParameter("log4j-xml-config") != null)
> 	DOMConfigurator.configure(classLoader.getResource(config.getInitParameter("log4j-xml-config"));
> 
> else if (config.getInitParameter("log4j-properties-config") != null)
> 	PropertyConfigurator.configure(classLoader.getResource(config.getInitParameter("log4j-properties-config"));
> 
> else
> 	PropertyConfigurator.configure(classLoader.getResource("webwork/log4j.properties"));
Why did you choose to use servlet config, when there is already a 
Configuration API that can be used? Seems logical to configure this 
through that instead. Otherwise, sure, absolutely.
/Rickard
-- 
Rickard Öberg
 |