0

I have a FileAppender, and usually the events are loggend in through the method Append(LoggingEvent loggingEvent) so a single event per time.I do have a question, in which cases the method Append(LoggingEvent[] loggingEvents) is called? I understand that is when there is an array of events to log, but my question is, how can i simulate the case of an array of events? what has to happen in order that the FileAppender.Append(LoggingEvent[] loggingEvents) is called ?

1 Answers1

0

You are right: if you use "just" a FileAppender each event is logged via the Append(LoggingEvent) method.

The other method call is fired when you are buffering events via, for example, the BufferingForwardingAppender: it will keep events in memory until some conditions are met, then it will call Append(LoggingEvent[]) on its inner appenders.

Manuel Spezzani
  • 1,041
  • 7
  • 15