| Author |
log4j XML reading problem
|
Jignesh Patel
Ranch Hand
Joined: Nov 03, 2001
Posts: 625
|
|
As a property file of log4j I have tried to use .xml file. But PropertyConfigurator couldn't able to read it on the contrarary .properties file worked fine. Is there anything I am missing while using log4j xml file?
|
 |
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
|
|
Well, it depends on what your XML file contains, right? BTW, I am moving this thread to the 'Other Open source products' forum. that's where we discuss the Log4J stuff anyways, so you would be able to get the maximum help in that forum. - m
|
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
|
 |
DW Bolton
Greenhorn
Joined: Jun 29, 2005
Posts: 28
|
|
Originally posted by Jignesh Patel: As a property file of log4j I have tried to use .xml file. But PropertyConfigurator couldn't able to read it on the contrarary .properties file worked fine.
You actually want to use DOMConfigurator when using an XML file for configuring log4j. PropertyConfigurator is only for reading properties files. DOMConfigurator.configureAndWatch() is a handy method, because you can set an interval to re-check the configuration file, meaning if you want to change log levels, you won't have to restart your container.
|
 |
 |
|
|
subject: log4j XML reading problem
|
|
|