You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2025/03/14 10:15:50 UTC
(logging-log4j2) 01/01: Add references to Copernik.eu Log4j components
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch doc/third-party-plugins
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 8e86f411967c24ddaec62920b4ce26e117f9d310
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Mar 14 11:15:27 2025 +0100
Add references to Copernik.eu Log4j components
This change adds references to the Log4j plugins from my personal "Extensions for Log4j and Tomcat" to the documentation.
---
.../antora/modules/ROOT/pages/manual/lookups.adoc | 28 +++++++++++++++++++++-
.../modules/ROOT/pages/manual/thread-context.adoc | 15 +++++++++++-
.../properties-context-selector.adoc | 15 +++++++++++-
3 files changed, 55 insertions(+), 3 deletions(-)
diff --git a/src/site/antora/modules/ROOT/pages/manual/lookups.adoc b/src/site/antora/modules/ROOT/pages/manual/lookups.adoc
index 3d01f953d2..e79988be39 100644
--- a/src/site/antora/modules/ROOT/pages/manual/lookups.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/lookups.adoc
@@ -966,7 +966,10 @@ include::partial$features/servlet-support.adoc[]
[#third-party]
== Third-party lookups
-The following additional lookups are available from third-party vendors:
+[IMPORTANT]
+====
+These lookups are provided by **third-party** vendors and are not maintained by the Apache Software Foundation.
+====
[#KubernetesLookup]
=== Kubernetes Lookup
@@ -999,6 +1002,29 @@ The Spring Boot 3 Lookup conflicts with the <<#SpringBootLookup>>.
If you are upgrading to Spring Boot 3, make sure to remove the latter from your classpath.
====
+[#TomcatLookup]
+=== Tomcat Lookup
+
+[cols="1h,4"]
+|===
+| Syntax
+|
+`tomcat:<key>`
+
+where `key` is one of the
+https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatLookup-keys[supported Tomcat Lookup keys]
+| Dependency | https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#installation[`eu.copernik:log4j-tomcat`]
+|===
+
+The Tomcat Lookup allows retrieving the names of the currently active Tomcat engine, host and application context.
+See
+https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatLookup[Copernik.eu Tomcat Lookup documentation] for more details.
+
+[TIP]
+====
+If you wish your custom lookup to appear on this page, use the ``[Edit]`` link at the top and submit a pull request.
+====
+
[#extending]
== Extending
diff --git a/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc b/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc
index 7262c4ca9d..66b13dea56 100644
--- a/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc
@@ -159,7 +159,20 @@ You can provide a custom `ContextDataProvider` implementation as follows:
----
META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider
----
-. Write the fully-qualified class name of your custom implementation (e.g., `com.mycompany.CustomContextDataProvider`) to the file created in the previous step
+. Write the fully-qualified class name of your custom implementation (e.g., `com.mycompany.CustomContextDataProvider`) to the file created in the previous step.
+
+==== Third-party custom thread context data providers
+
+[IMPORTANT]
+====
+These context data providers are supplied by **third-party** vendors and are not maintained by the Apache Software Foundation.
+====
+
+https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/log4j/log4j-context-data/log4j-context-data-2.17/library-autoconfigure[OpenTelemetry Context Data Provider]::
+Injects trace context data into log events.
+
+https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatContextDataProvider[Copernik.eu Tomcat Context Data Provider]::
+Injects the name of the currently active Tomcat engine, host and web application into log events.
[#custom-ThreadContextMap]
=== Custom thread context map
diff --git a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-context-selector.adoc b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-context-selector.adoc
index 423aa55b94..ab2cc12e0a 100644
--- a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-context-selector.adoc
+++ b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-context-selector.adoc
@@ -55,4 +55,17 @@ link:../javadoc/log4j-core/org/apache/logging/log4j/core/osgi/BundleContextSelec
Creates a separate logger context per OSGi bundle and synchronous loggers
link:../javadoc/log4j-core/org/apache/logging/log4j/core/selector/JndiContextSelector.html[`org.apache.logging.log4j.core.selector.JndiContextSelector`]::
-Creates loggers contexts based on a JNDI lookup and synchronous loggers See xref:jakarta.adoc#jndi-configuration[Web application] for details.
\ No newline at end of file
+Creates loggers contexts based on a JNDI lookup and synchronous loggers See xref:jakarta.adoc#jndi-configuration[Web application] for details.
+
+There are also third-party context selector implementations:
+
+[IMPORTANT]
+====
+These context selectors are provided by **third-party** vendors and are not maintained by the Apache Software Foundation.
+====
+
+https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatContextSelector[`eu.copernik.log4j.tomcat.TomcatContextSelector`]::
+Selects the currently active Tomcat web application and creates synchronous loggers.
+
+https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatContextSelector[`eu.copernik.log4j.tomcat.TomcatAsyncContextSelector`]::
+Selects the currently active Tomcat web application and creates xref:manual/async.adoc[asynchronous loggers].
\ No newline at end of file