ppkarwasz commented on code in PR #2736:
URL: https://github.com/apache/logging-log4j2/pull/2736#discussion_r1677884231
##########
src/site/antora/modules/ROOT/pages/manual/lookups.adoc:
##########
@@ -89,561 +324,475 @@ It supports the retrieval of following container
attributes:
|shortImageId |The first 12 characters of the container image ID
|===
-[id=environment-lookup]
-== [[EnvironmentLookup]] Environment Lookup
+Additional runtime dependencies are required for using Docker Lookup:
-The EnvironmentLookup allows systems to configure environment variables,
-either in global files such as /etc/profile or in the startup scripts
-for applications, and then retrieve those variables from within the
-logging configuration. The example below includes the name of the
-currently logged in user in the application log.
+include::partial$manual/dependencies-log4j-docker.adoc[]
-[source,xml]
-----
-<File name="Application" fileName="application.log">
- <PatternLayout>
- <pattern>%d %p %c{1.} [%t] $${env:USER} %m%n</pattern>
- </PatternLayout>
-</File>
-----
+[#EnvironmentLookup]
+=== Environment Lookup
-This lookup also supports default value syntax. In the sample below,
-when the `USER` environment variable is undefined, the default value
-`jdoe` is used:
+[cols="1h,4"]
+|===
+| Lookup ID | `env`
+| Context | _global_
+| Key format | _any_ `String`
+|===
+
+The Environment Lookup retrieves the value of the
+https://docs.oracle.com/javase/{java-target-version}/docs/api/java/lang/System.html#getenv-java.lang.String-[OS
environment variable]
+associated with the key.
-[source,xml]
-----
-<File name="Application" fileName="application.log">
- <PatternLayout>
- <pattern>%d %p %c{1.} [%t] $${env:USER:-jdoe} %m%n</pattern>
- </PatternLayout>
-</File>
-----
[#EventLookup]
-== Event Lookup
+=== Event Lookup
Review Comment:
Fixed in
https://github.com/apache/logging-log4j2/pull/2736/commits/d61392889386587307ecfac881ae27dae2d0e2d1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]