
Hi Ceki, I'm getting no replies from Log4J guys so I thought I ask you.... I'm trying to change the appender (read from the config file) from Console to File at runtime. and I'm doing it by calling the DOMConfigurator.configure(String file) I'm getting some unexpected results however that I'm not sure how to fix. The Console appender does its job and the log messages are printed to the console as expected. (let say I'm printing only 5 log messages) Then I re-read the config file (by calling the above stated DOMConfigurator.configure(newConfigFile) method) that has a File appender in it. (another set of 5 log messages should be written to the file.) What I see in the file are 10 messages not 5.... The ones that I printed earlier to the console plus 5 new ones - after I changed the appender. I'm guessing that there is some kind of buffer that temporarily stores these log messages. Is there? How can I clear it so that when I re-read my config file with different appender, previous log messages (if any) won't be wrriten there? Any suggestion? Thanks Greg.
participants (1)
-
Greg Flex