In org.apache.log4j Class AsyncAppender public void setBufferSize(int size)
Sets the number of messages allowed in the event
buffer before the calling thread is blocked (if blocking is true)
or until messages are summarized and discarded. Changing the size
will not affect messages already in the buffer.
I have configured 10,000. But the file continues grow also after 10K! What is the reason?
When something is logged, it is added to the event buffer in memory. Messages in this event buffer are then written to disk.
If you log things faster than they can be written to disk, the event buffer fills up. In your case, if the event buffer reaches 10,000 messages, the logging mechanism takes action to keep it at 10,000 messages or lower: either blocking until the buffer is written to disk, or throwing away log messages.