not lose log events while reload its configuration problem

2014-04-20 Thread huang
Hi all, I am learning the source code of log4j 2.I want to know how log4j 2 can reload its configuration without losing log events while reconfiguration is taking place..How can it make sure it don't lose log events while reload its configuration. Thanks. With regards.

Re: not lose log events while reload its configuration problem

2014-04-20 Thread Ralph Goers
Unlike Log4j 1 and Logback, Log4j 2 separates the configuration from the actual Logger objects. When a reconfiguration occurs a new Configuration is created. Once it is completed each Logger is modified to reference a LoggerConfig in the new Configuration. So for a small amount of time some

Re: not lose log events while reload its configuration problem

2014-04-20 Thread Matt Sicker
At first, I thought it looked like a bridge design pattern. Upon further comparison, it doesn't really fit that pattern (nor does it fit any other common design patterns that I can see). It's rather neat, actually. Essentially, a Configuration is tied to a LoggerContext. The LoggerContext