Skip to content

Unusual immediateFlush behaviour #3312

Answered by ppkarwasz
daniel-b2c2 asked this question in Q&A
Discussion options

You must be logged in to vote

Looking at the docs:

https://logging.apache.org/log4j/2.x/manual/appenders.html
The buffer is flushed to the underlying resource on three occasions:

  • Per the docs above, there's apparently the concept of a log event 'batch' I'm unclear what that is?

The concept of batch appears only if you use asynchronous loggers or appenders, which rely on a queue/buffer ring of log events. Your application threads will fill the queue with events and an asynchronous thread will deliver them to the destination. The end of batch corresponds to the situation, when the asynchronous thread man…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@daniel-b2c2
Comment options

@daniel-b2c2
Comment options

@ppkarwasz
Comment options

Answer selected by daniel-b2c2
@daniel-b2c2
Comment options

@ppkarwasz
Comment options

@daniel-b2c2
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants