On 12/27/06, chuanjiang lo <[EMAIL PROTECTED]> wrote:
I am using PropertyConfigurator.configure in the Listener class
PropertyConfigurator.configure(event.getServletContext
().getRealPath("")+"/WEB-INF/foo.xml");
Log4j is picking up foo.xml, However it seems like the logging events does
not behave as what foo.xml specifies. Nothing has changed.
Appreciate any kind advice.
Learnt the mistake here.
I should be using DOMConfigurator.configure()
One thing i notice for PropertiesConfigurator
for e.g.
Properties props = new Properties();
props.put("admin-console-abs-home", path);
in = this.getClass().getClassLoader().getResourceAsStream("foo.properties
");
props.load(in);
PropertyConfigurator.configure(props);
In this case in foo.properties, we are able to use ${admin-console-abs-home}
as a variable.
Is there any method for DOMConfigurator?