bluedenim / log4j-s3-search

Log4j appender with S3, Azure, Google Cloud, and search publishing
MIT License
65 stars 44 forks source link

Compatibility with / Benchmarking with Asynchronous logging #130

Open yan-hic opened 2 years ago

yan-hic commented 2 years ago

How does the appender integrate with Asynchronous logging as described at https://logging.apache.org/log4j/2.x/manual/async.html#AllAsync

According to log4j doc, there is a huge performance gain but not sure if it is leveraged by log4j-s3-search.

If not,

bluedenim commented 2 years ago

is there any benefit for integrating with each other? I assume combining both as-is would lead to buffering twice.

There may be some benefit in lower latency when logging. The current impl definitely did not optimize for that. There will definitely be multiple buffering involved. Currently there is already a buffer that is flushed either by size or by time. I suspect the async logging layer probably has its own buffering layer. I am pretty confident that the async layer WILL have a lower latency than what I have now.

is there any plan using the core Async mechanism?

Maybe. I'll need to learn more about that new async layer and how flexible and configurable it is. If there is a need to improve on the latency of various logging (e.g. info(), warning(), error(), etc.) calls, then that's a good motivation for it.