This is an automated email from the ASF dual-hosted git repository. ramanathan1504 pushed a commit to branch ramanathan1504-issue-2351 in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit cafb65b3ade6ad0075fe9da05f3fdad92dc66be9 Author: Matthias Langer <[email protected]> AuthorDate: Sat May 2 21:19:21 2026 +0200 Add documentation pointer to the Async HTTP Appender of `more-log4j2` (#4062) Co-authored-by: Volkan Yazıcı <[email protected]> --- src/site/antora/modules/ROOT/pages/manual/appenders.adoc | 14 ++++++++++++++ .../modules/ROOT/pages/manual/appenders/network.adoc | 14 +++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc index a43675fb54..804d402f8d 100644 --- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc @@ -605,6 +605,20 @@ Dynamically choose a different appender for each log event See xref:manual/appenders/delegating.adoc[] for details. +[#third-party] +== Third-party appenders + +[WARNING] +==== +These appenders are provided by **third-party** vendors and are not maintained by the link:{logging-services-url}[Apache Logging Services] project. +==== + +[#more-log4j2-AsyncHttpAppender] +=== Async HTTP appender (`more-log4j2`) + +`AsyncHttpAppender` by https://github.com/mlangc/more-log4j2[more-log4j2] batches and optionally compresses log events, before sending them to backends. +This way it is able to deliver high log volumes with little overhead. + [#extending] == Extending diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc index 425f87704e..7425e72c1a 100644 --- a/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc @@ -283,11 +283,23 @@ Additional headers can be configured using the nested If the appender receives a response with status code different from `2xx`, an exception is thrown. See also <<HttpAppender-attr-ignoreExceptions,`ignoreExceptions`>> configuration attribute. +[WARNING] +==== +Sending logs synchronously, one by one to an HTTP backend is rarely a good idea. +In such a setup, every network or backend-related issue will immediately impact all loggers delegating to the HTTP Appender. +Even when everything is working fine, log statements will block for tens or hundreds of milliseconds in a typical setup. +This is orders of magnitude more than what you get with the xref:manual/appenders.adoc#ConsoleAppender[console appender] and the xref:manual/appenders/file.adoc[file appender]. +Also consider the number of HTTP requests and the associated network traffic that can result from such a setup. + +Consider at least xref:manual/async.adoc[asynchronous loggers] if you want to use this appender. +Otherwise, please have a look at xref:manual/appenders.adoc#third-party[third-party appenders]. +==== + [NOTE] ==== The implementation uses https://docs.oracle.com/javase/{java-target-version}/docs/api/java/net/HttpURLConnection.html[`HttpURLConnection`] -under the hood. +The implementation uses https://docs.oracle.com/javase/{java-target-version}/docs/api/java/net/HttpURLConnection.html[`HttpURLConnection`] under the hood. ==== [#HttpAppender-attributes]
