This is an automated email from the ASF dual-hosted git repository.
rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new 1dea59c Document how to disable message pattern lookups (#450)
1dea59c is described below
commit 1dea59c798e9dbdd1347444a4e589244baf3ec0f
Author: Yanming Zhou <[email protected]>
AuthorDate: Sun Feb 7 09:17:16 2021 +0800
Document how to disable message pattern lookups (#450)
---
src/site/asciidoc/manual/configuration.adoc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/site/asciidoc/manual/configuration.adoc
b/src/site/asciidoc/manual/configuration.adoc
index 12e8c05..125a5b2 100644
--- a/src/site/asciidoc/manual/configuration.adoc
+++ b/src/site/asciidoc/manual/configuration.adoc
@@ -1146,6 +1146,13 @@ included, such as ``${main:\--file:-app.properties}`.
This would use the
`MainMapLookup` for a key named `--file`. If the key is not found then
<code>app.properties</code> would be used as the default value.
+[#DisablingMessagePatternLookups]
+== Disables Message Pattern Lookups
+A message is processed (by default) by lookups, for example if you defined
+`<Property name="foo.bar">FOO_BAR</Property>`, then
`logger.info("${foo.bar}")` will output `FOO_BAR` instead of `${foo.bar}`.
+You could disable message pattern lookups globally by setting system property
`log4j2.formatMsgNoLookups` to true,
+or defining message pattern using %m{nolookups}.
+
[#RuntimeLookup]
== Lookup Variables with Multiple Leading '$' Characters