You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2024/05/27 08:36:16 UTC
(logging-log4j2) branch 2.x updated: Fix duplicate location information
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/2.x by this push:
new 9e20756018 Fix duplicate location information
9e20756018 is described below
commit 9e207560182a469949f5b860384b37a276b58804
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon May 27 10:36:03 2024 +0200
Fix duplicate location information
---
.../antora/modules/ROOT/pages/manual/layouts.adoc | 49 +---------------------
1 file changed, 2 insertions(+), 47 deletions(-)
diff --git a/src/site/antora/modules/ROOT/pages/manual/layouts.adoc b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc
index 0ca8817484..45f7c19f38 100644
--- a/src/site/antora/modules/ROOT/pages/manual/layouts.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc
@@ -33,50 +33,10 @@ A custom character encoder was added to Log4j 2.4.1 for the ISO-8859-1 and US-AS
[#common-concerns]
== Common concerns
-[#location-information]
+[#LocationInformation]
=== Location information
-Computing the location information of a logging statement is an expensive operation.
-For this reason many Log4j components implement the
-link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/LocationAware.html[LocationAware]
-interface to only compute location information when needed.
-
-Some layouts implement `LocationAware` and they determine if a location information is required according to these rules:
-
-<<GELFLayout,GelfLayout>>::
-+
-The GELF layout requires location information only if the pattern of the `messagePattern` requires location information.
-+
-See <<location-pattern-layout,PatternLayout case>> below.
-
-<<HTMLLayout,HtmlLayout>>::
-+
-The HTML layout requires location information if the <<HtmlLocationInfo,locationInfo>> configuration attribute is set to `true`.
-
-[[location-pattern-layout]]<<PatternLayout,PatternLayout>>::
-+
-The pattern layout will require location information if at least one of these patterns is used:
-+
-* <<PatternClass,`%C` or `%class`>>,
-* <<PatternFile,`%F` or `%file`>>,
-* <<PatternLocation,`%l` or `%location`>>,
-* <<PatternLine,`%L` or `%line`>>,
-* <<PatternMethod,`%M` or `%method`>>.
-
-xref:manual/json-template-layout.adoc[JsonTemplateLayout]::
-+
-The JSON template layout will require location information if the
-xref:manual/json-template-layout.adoc#locationInfoEnabled[locationInfoEnabled]
-configuration attribute is set to `true`.
-
-The remaining layouts do not require location information.
-
-[NOTE]
-====
-Even if a layout is configured not to **request** location information, it might use it if the information is already available.
-This is always the case of information location computed at build time using the
-link:/log4j/transform/latest/#log4j-transform-maven-plugin[Log4j Transform Maven Plugin].
-====
+include::partial$manual/layouts-location-information.adoc[]
[#CSVLayouts]
== CSV Layouts
@@ -2320,8 +2280,3 @@ Custom fields are always last, in the order they are declared.
The values support xref:manual/lookups.adoc[lookups].
NOTE: Additional xref:runtime-dependencies.adoc[runtime dependencies] are required for using YamlLayout.
-
-[#LocationInformation]
-== Location information
-
-include::partial$manual/layouts-location-information.adoc[]