Skip to content

Commit 61611d9

Browse files
committed
Reformat with one-line-per-sentence
1 parent 5e9cf97 commit 61611d9

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-loggin
2828
plugins that provide values for simple `$+{prefix:key}+` expressions.
2929
3030
`StrLookup` is a simple map-like interface.
31-
The main difference between a map and `StrLookup` is
32-
that the latter can compute the value of a key programmatically in a global context or in the context of log event.
31+
The main difference between a map and `StrLookup` is that the latter can compute the value of a key programmatically in a global context or in the context of log event.
3332
3433
[#evaluation-contexts]
3534
== Evaluation contexts
3635
37-
Each lookup has an associated prefix,
38-
and Log4j can evaluate it in one of the following ways:
36+
Each lookup has an associated prefix, and Log4j can evaluate it in one of the following ways:
3937
4038
[#global-context]
4139
Global context::
@@ -257,8 +255,7 @@ are not supported.
257255
====
258256
259257
Log event context::
260-
In the context of an event, the Context Map lookup uses the
261-
Log event
258+
In the context of an event, the Context Map lookup uses the Log event
262259
link:../javadoc/log4j-core/org/apache/logging/log4j/core/LogEvent.html#getContextData()[context map data]
263260
of a log event to resolve the key.
264261
xref:manual/thread-context.adoc#custom-ContextDataProvider[Custom context data providers] are therefore supported.
@@ -548,8 +545,7 @@ You can use this lookup to provide a primitive argument parsing mechanism to you
548545
include::example$manual/lookups/MainArgsExample.java[tag=usage]
549546
----
550547
+
551-
<1> Use an **instance** logger field instead of a static one,
552-
to prevent Log4j Core initialization before `main()` is called.
548+
<1> Use an **instance** logger field instead of a static one, to prevent Log4j Core initialization before `main()` is called.
553549
<2> Call `MainMapLookup#setMainArguments` by reflection to allow your application to run with a different Log4j API implementation.
554550
555551
* Now you can use `$+{main:...}+` lookups in your configuration file to support the usage of a `--logfile <file>` CLI argument to specify the log file and `--loglevel <level>` CLI argument to specify the log level.
@@ -686,8 +682,7 @@ Spring Boot 2 initializes Log4j Core at least **twice**:
686682
* Log4j Core is initialized the first time using
687683
xref:manual/configuration.adoc#automatic-configuration[its own automatic configuration procedure].
688684
At this point, the lookup will always return `null`.
689-
Configuration files that use the standard `log4j2.<extension>` naming convention,
690-
should provide default values for all Spring lookups.
685+
Configuration files that use the standard `log4j2.<extension>` naming convention, should provide default values for all Spring lookups.
691686
692687
* As soon as Spring's `Environment` is ready, the lookup becomes **available** and a reconfiguration is triggered.
693688
If you want to provide a configuration file specifically for this phase, call it `log4j2-spring.<extension>`.
@@ -732,8 +727,7 @@ of a `StructuredDataMessage`.
732727
733728
[TIP]
734729
====
735-
Whenever conversion patterns are allowed and `key` is not one of the virtual keys,
736-
an `$$+{sd:key}+` lookup is equivalent to a
730+
Whenever conversion patterns are allowed and `key` is not one of the virtual keys, an `$$+{sd:key}+` lookup is equivalent to a
737731
xref:manual/pattern-layout.adoc#converter-map[`%K\{key}` pattern].
738732
====
739733

0 commit comments

Comments
 (0)