How to use log4j's FileAppenders asynchronously?

前端 未结 3 547
孤城傲影
孤城傲影 2021-02-06 05:49

I work on a low-latency trading application. We\'d like to increase the amount of lof4j logging that we write to file, whilst minimising the impact on our end-to-end processing

3条回答
  •  天涯浪人
    2021-02-06 06:03

    bear in mind that AsyncAppender adds a thread per appender & that increasing the amount of logging you do may mean a substantial increase in the amount of string concatentation going on which often means a substantial amount of string processing/munging/formatting which can be pretty expensive (relative to the latency involved in a low latency trading app anyway).

提交回复
热议问题