FreeAndNil commented on issue #149:
URL: 
https://github.com/apache/logging-log4net/issues/149#issuecomment-2135095369

   This is not how the BufferingAppenders work.
   The evaluator is only evaluated when new events are logged, not when "some 
time passes" (because the logic calling the evaluator is unaware of its 
internals).
   When you really want such a behavior, you can flush with a timer:
   `
     System.Threading.Timer timer = new(Flush, null, 10_000, 10_000);
   
   static void Flush(object? _)
   {
     foreach (TAppender appender in 
LogManager.GetRepository().GetAppenders().OfType<BufferingAppender>())
       appender.Flush();
   }
   `
   Hope this helps.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to