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 ch...@kodak.com on 2001/12/18 03:36:31 UTC

Problem with propertyConfigurator's configureAndWatch() method

From: Chandra Swaminathan

I am using log4j version 1.1.3.  I have been experimenting with the
configureAndWatch() method of the propertyConfigurator to re-read the
configuration data at runtime.  So I have a program with 4 separate threads
logging messages continously after the appenders, categories and priorities
were configured initially using the configureAndWatch() method.  If I copy
a different configuration file on top of the one that I originally passed
to the program, reconfiguration works some times and does not work most
times.  I am not sure what I am doing wrong.  Below are the two config
files that I am using.  The only thing different about the 2 files is the
layout.ConversionPattern.

I would appreciate any help.

Thanks

Chandra.

File #1
----------
log4j.debug
log4j.rootCategory=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%5p [%t] %c - %m%n

log4j.category.Test4l4j.threadA=FATAL
log4j.category.Test4l4j.threadB=WARN

File #2
----------
log4j.debug
log4j.rootCategory=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern= %c [%t] %5p - %m%n

log4j.category.Test4l4j.threadA=FATAL
log4j.category.Test4l4j.threadB=WARN






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>