swebb2066 commented on issue #332:
URL: 
https://github.com/apache/logging-log4cxx/issues/332#issuecomment-1902810015

   > FileAppender works just fine. I was thinking how could I optimize it more.
   
   The default value of `BufferedIO` is false [documented 
here](https://logging.apache.org/log4cxx/latest_stable/classlog4cxx_1_1FileAppender.html#a0126112f63df5a5c5e8adfb72c091d64)
 . Configuring the `BufferedIO` of `FileAppender` to `true` greatly (by up to 
10 times) increases output rate.
   
   > BufferSize (bounded-buffer) parameter for AsyncAppender
   
   The default value is 128
   
   > could be a situation that some data get aborted when application exited.
   
   I believe `AsyncAppender` will write all events before your program exits 
(unless abnormally terminated). However, if your program adds events to 
`AsyncAppender` faster then the background thread can write and the buffer 
overflows, then logging events will be discarded. Be sure to set `BufferedIO` 
of `FileAppender` to `true` in the appender attached to `AsyncAppender`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to