diff --git a/src/site/antora/modules/ROOT/pages/manual/lookups.adoc b/src/site/antora/modules/ROOT/pages/manual/lookups.adoc index 3d01f953d21..b6281772bb6 100644 --- a/src/site/antora/modules/ROOT/pages/manual/lookups.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/lookups.adoc @@ -966,7 +966,12 @@ 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 +link:{logging-services-url}[Apache Logging Services] +(Log4j, Log4cxx, Log4net) project. +==== [#KubernetesLookup] === Kubernetes Lookup @@ -999,6 +1004,24 @@ 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:` + +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. + [#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 7262c4ca9dd..c4085c839ef 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,22 @@ 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 +link:{logging-services-url}[Apache Logging Services] +(Log4j, Log4cxx, Log4net) project. +==== + +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 423aa55b94e..0993c9dd6fb 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,19 @@ 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 +link:{logging-services-url}[Apache Logging Services] +(Log4j, Log4cxx, Log4net) project. +==== + +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