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 time.
What is the recommended way of doing this? I think FileAppender.append is synchronous, so we need to do something a bit smarter than that….
Yes, the appenders are synchronous. You want something like this:
http://www.spartanjava.com/2009/asynchronous-logging-with-log4j/