You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Richard Trevor <ri...@blackpearl.com> on 2001/02/01 17:43:24 UTC

run-time reconfiguration (plain text this time)

Sorry about the previous RTF message. Here it is in plain text:

Is the resetConfiguration/configure logic  (specifically
PropertyConfigurator) a little buggy? 

I spun up an application with a PropertyConfigurator and it worked just
fine. 

I then tried to reconfigure log4j at run-time in the following way: 

1) Issue a PropertyConfigurator.resetConfiguration() method call. 
2) Issue a PropertyConfigurator.configure method call with a new Properties
class. 

I get the following output, (with the  -Dlog4j.configDebug=true flag set): 

log4j:ERROR No appenders could be found for category (root). 
log4j:ERROR Please initialize the log4j system properly. 
log4j: Parsing for [root] with value=[INFO, BPTraceLog]. 
log4j: Priority token is [INFO]. 
log4j: Category root set to INFO 
log4j: Parsing appender named "BPTraceLog". 
log4j: Option Threshold=[null]. 
log4j: Option File=[bptrace.log]. 
log4j: Option Append=[false]. 
log4j: Option ImmediateFlush=[null]. 
log4j: Parsed "BPTraceLog" options. 
log4j: Parsing layout options for "BPTraceLog". 
log4j: Option ConversionPattern=[%d [%t] %-5p %c %x - %m%n]. 
log4j: End of parsing for "BPTraceLog". 
log4j: Finished configuring. 

...something seems funny because it is screaming about "no appenders for
category (root)", 
and then proceeds to parse out exactly what it was looking for... 

Thanks in advance for any insights... 

Rich Trevor