-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Feature Description:
At the time of writing this, the timer task in AsyncFileHandler
flushes the current event buffer to the writer's queue periodically (as per config - default every 1000ms). This ensures that even if the logging intensity is low and/or the buffer big, log records will find their way in the trace log without having to wait too long.
However, in the cases where log intensity may be high (and/or the buffer small), the timer task might trigger the buffer being flushed to the writer's queue more than necessary, e.g. soon after it was flushed after reaching its maximum size. This seems sub-optimal.
Ultimately, the behavior will still depend on the config - the buffer size, the flush period, as well as how much logging is happening in the application using the handler. But it would be easier to keep the desirable behavior and prevent the undesirable one, if, e.g. the timer task was re-set or cancelled and then recreated, every time the buffer is flushed because its max size was reached.