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