Well, Log4j only feeds events to Appenders one at a time. It has no place to 
aggregate them. However, one Appender could wrap others to create a batch at 
which point this would become useful.  I suppose some other component could be 
invented to create a batch but I am not sure where or how that would fit into 
the process -   does the batch apply only to a single appender or to multiple 
appenders?  What filtering takes place before it is added to the batch and 
what, if any, happens after?

Ralph

> On Sep 24, 2020, at 8:00 AM, Volkan Yazıcı <[email protected]> wrote:
> 
> If one would look close to existing appenders, almost everyone of them
> implements a custom batching solution. To the best of my knowledge, this is
> mainly due to the constraint in the Appender interface:
> 
>    void append(LogEvent event);
> 
> If this would have been replaced (enhanced?) with
> 
>    void append(List<LogEvent> event);
> 
> appenders wouldn't need to implement any batching at all. Further, Log4j
> could have also provided a batching filter replacing all the custom
> batching code internal to the appenders.
> 
> What do you think? Am I missing something obvious here?


Reply via email to