logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pagod <dvergn...@yahoo.com>
Subject Re: AW: Configuring log4j with XML
Date Wed, 30 Sep 2009 08:42:02 GMT

Hi!

Thanks a lot for the reply, it did help *a lot* :-). I still have a few
concerns, though they're just things that surprise me rather than real
problems. 


Bender Heri wrote:
> 
> - If for some reasons you must load the configuration programmatically: a
> XML configuration should be loaded by the DOMConfigurator, a properties
> file by the PropertiesConfigurator. I suppose in your second experiment
> the (default) configurator finds the default.xml (given by commandline
> param), but the PropertyConfigurator cannot load the second xml file (as
> in all further experiments).
> 
I guess the real problem here (apart from my being unable to find the proper
class by myself) might be that absolutely no error message regarding the
incorrect syntax of the expected property file is displayed when trying to
load the XML file using the PropertyConfigurator, even in the debug output.
There not being such an error message made me think there was no problem on
this front. That might be a thing they might want to improve in the next
release. 



Bender Heri wrote:
> 
> - the double output in your third experiment was due you have then two
> loggers in the hierarchy (both from the default.xml). In code you are
> calling the logger "Test" which outputs to its appender, then climbing up
> to the root logger which outputs the same log message to its appender
> again (which happens to be the same one). To avoid this, you should
> declare your Test-Logger with additivity set to false (default true):
> 
I'd have thought having the level value of root set to "fatal" would prevent
"info" messages from being displayed by the root logger, even with the same
appender? Or is this not taken into account when displaying messages coming
from child loggers? 

anyway, thanks again, now it's gonna work like a charm :-)

cheers

pagod
-- 
View this message in context: http://www.nabble.com/Configuring-log4j-with-XML-tp25666820p25677104.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message