Skip to content

Commit d42d28f

Browse files
ppkarwaszvy
andcommitted
Add references to Copernik.eu Log4j components (#3534)
This change adds references to the Log4j plugins from my personal "Extensions for Log4j and Tomcat" to the documentation. Co-authored-by: Volkan Yazıcı <[email protected]>
1 parent 5bbd1b2 commit d42d28f

File tree

3 files changed

+56
-3
lines changed

3 files changed

+56
-3
lines changed

src/site/antora/modules/ROOT/pages/manual/lookups.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,12 @@ include::partial$features/servlet-support.adoc[]
966966
[#third-party]
967967
== Third-party lookups
968968
969-
The following additional lookups are available from third-party vendors:
969+
[IMPORTANT]
970+
====
971+
These lookups are provided by **third-party** vendors and are not maintained by the
972+
link:{logging-services-url}[Apache Logging Services]
973+
(Log4j, Log4cxx, Log4net) project.
974+
====
970975
971976
[#KubernetesLookup]
972977
=== Kubernetes Lookup
@@ -999,6 +1004,24 @@ The Spring Boot 3 Lookup conflicts with the <<#SpringBootLookup>>.
9991004
If you are upgrading to Spring Boot 3, make sure to remove the latter from your classpath.
10001005
====
10011006
1007+
[#TomcatLookup]
1008+
=== Tomcat Lookup
1009+
1010+
[cols="1h,4"]
1011+
|===
1012+
| Syntax
1013+
|
1014+
`tomcat:<key>`
1015+
1016+
where `key` is one of the
1017+
https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatLookup-keys[supported Tomcat Lookup keys]
1018+
| Dependency | https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#installation[`eu.copernik:log4j-tomcat`]
1019+
|===
1020+
1021+
The Tomcat Lookup allows retrieving the names of the currently active Tomcat engine, host and application context.
1022+
See
1023+
https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatLookup[Copernik.eu Tomcat Lookup documentation] for more details.
1024+
10021025
[#extending]
10031026
== Extending
10041027

src/site/antora/modules/ROOT/pages/manual/thread-context.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,22 @@ You can provide a custom `ContextDataProvider` implementation as follows:
159159
----
160160
META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider
161161
----
162-
. Write the fully-qualified class name of your custom implementation (e.g., `com.mycompany.CustomContextDataProvider`) to the file created in the previous step
162+
. Write the fully-qualified class name of your custom implementation (e.g., `com.mycompany.CustomContextDataProvider`) to the file created in the previous step.
163+
164+
==== Third-party custom thread context data providers
165+
166+
[IMPORTANT]
167+
====
168+
These context data providers are supplied by **third-party** vendors and are not maintained by the
169+
link:{logging-services-url}[Apache Logging Services]
170+
(Log4j, Log4cxx, Log4net) project.
171+
====
172+
173+
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]::
174+
Injects trace context data into log events.
175+
176+
https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatContextDataProvider[Copernik.eu Tomcat Context Data Provider]::
177+
Injects the name of the currently active Tomcat engine, host and web application into log events.
163178
164179
[#custom-ThreadContextMap]
165180
=== Custom thread context map

src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-context-selector.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,19 @@ link:../javadoc/log4j-core/org/apache/logging/log4j/core/osgi/BundleContextSelec
5151
Creates a separate logger context per OSGi bundle and synchronous loggers
5252
5353
link:../javadoc/log4j-core/org/apache/logging/log4j/core/selector/JndiContextSelector.html[`org.apache.logging.log4j.core.selector.JndiContextSelector`]::
54-
Creates loggers contexts based on a JNDI lookup and synchronous loggers See xref:jakarta.adoc#jndi-configuration[Web application] for details.
54+
Creates loggers contexts based on a JNDI lookup and synchronous loggers See xref:jakarta.adoc#jndi-configuration[Web application] for details.
55+
56+
There are also third-party context selector implementations:
57+
58+
[IMPORTANT]
59+
====
60+
These context selectors are provided by **third-party** vendors and are not maintained by the
61+
link:{logging-services-url}[Apache Logging Services]
62+
(Log4j, Log4cxx, Log4net) project.
63+
====
64+
65+
https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatContextSelector[`eu.copernik.log4j.tomcat.TomcatContextSelector`]::
66+
Selects the currently active Tomcat web application and creates synchronous loggers.
67+
68+
https://oss.copernik.eu/tomcat/3.x/components/log4j-tomcat#TomcatContextSelector[`eu.copernik.log4j.tomcat.TomcatAsyncContextSelector`]::
69+
Selects the currently active Tomcat web application and creates xref:manual/async.adoc[asynchronous loggers].

0 commit comments

Comments
 (0)