You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2017/11/29 21:16:47 UTC

svn commit: r1021515 - /websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html

Author: mikes
Date: Wed Nov 29 21:16:47 2017
New Revision: 1021515

Log:
LOG4J2-2136 Clarify that additional fields in Gelf, Json, Xml and Yaml layouts support lookups

Modified:
    websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html

Modified: websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html
==============================================================================
--- websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html (original)
+++ websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html Wed Nov 29 21:16:47 2017
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<!-- Generated by Apache Maven Doxia at 2017-11-19 -->
+<!-- Generated by Apache Maven Doxia at 2017-11-29 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -28,7 +28,7 @@
 		<script type="text/javascript" src="../js/site.js"></script>
 			<meta name="author" content="Ralph Goers" />
 			<meta name="author" content="Gary Gregory" />
-		<meta name="Date-Revision-yyyymmdd" content="20171119" />
+		<meta name="Date-Revision-yyyymmdd" content="20171129" />
 		<meta http-equiv="Content-Language" content="en" />
 		
 				</head>
@@ -617,10 +617,7 @@ logger.debug(&quot;one={}, two={}, three
 <pre class="prettyprint linenums">
   &lt;Appenders&gt;
     &lt;Socket name=&quot;Graylog&quot; protocol=&quot;udp&quot; host=&quot;graylog.domain.com&quot; port=&quot;12201&quot;&gt;
-        &lt;GelfLayout host=&quot;someserver&quot; compressionType=&quot;ZLIB&quot; compressionThreshold=&quot;1024&quot;&gt;
-            &lt;KeyValuePair key=&quot;additionalField1&quot; value=&quot;constant value&quot;/&gt;
-            &lt;KeyValuePair key=&quot;additionalField2&quot; value=&quot;$${ctx:key}&quot;/&gt;
-        &lt;/GelfLayout&gt;
+        &lt;GelfLayout host=&quot;someserver&quot; compressionType=&quot;ZLIB&quot; compressionThreshold=&quot;1024&quot;/&gt;
     &lt;/Socket&gt;
   &lt;/Appenders&gt;
 </pre></div>
@@ -633,10 +630,7 @@ logger.debug(&quot;one={}, two={}, three
 <pre class="prettyprint linenums">
   &lt;Appenders&gt;
     &lt;Socket name=&quot;Graylog&quot; protocol=&quot;tcp&quot; host=&quot;graylog.domain.com&quot; port=&quot;12201&quot;&gt;
-        &lt;GelfLayout host=&quot;someserver&quot; compressionType=&quot;OFF&quot; includeNullDelimiter=&quot;true&quot;&gt;
-            &lt;KeyValuePair key=&quot;additionalField1&quot; value=&quot;constant value&quot;/&gt;
-            &lt;KeyValuePair key=&quot;additionalField2&quot; value=&quot;$${ctx:key}&quot;/&gt;
-        &lt;/GelfLayout&gt;
+        &lt;GelfLayout host=&quot;someserver&quot; compressionType=&quot;OFF&quot; includeNullDelimiter=&quot;true&quot;/&gt;
     &lt;/Socket&gt;
   &lt;/Appenders&gt;
 </pre></div>
@@ -710,15 +704,31 @@ logger.debug(&quot;one={}, two={}, three
             </tr>
             
           </table>
-           
+          
 <p>
-             See also:
-           </p>
-           
+              To include any custom field in the output, use following syntax:
+          </p>
+              
+<div>
+<pre class="prettyprint linenums">
+  &lt;GelfLayout&gt;
+    &lt;KeyValuePair key=&quot;additionalField1&quot; value=&quot;constant value&quot;/&gt;
+    &lt;KeyValuePair key=&quot;additionalField2&quot; value=&quot;$${ctx:key}&quot;/&gt;
+  &lt;/GelfLayout&gt;
+</pre></div>
+          
+<p>
+              Custom fields are included in the order they are declared. The values support <a href="lookups.html">lookups</a>.
+          </p>
+          
+<p>
+            See also:
+          </p>
+          
 <ul>
-             
+            
 <li>The <a class="externalLink" href="http://docs.graylog.org/en/latest/pages/gelf.html#gelf">GELF specification</a></li>
-           </ul>
+          </ul>
         </div>
         <a name="HTMLLayout"></a>
         
@@ -1011,7 +1021,8 @@ logger.debug(&quot;one={}, two={}, three
           
 <p>
               To include any custom field in the output, use following syntax:
-              </p>
+          </p>
+              
 <div>
 <pre class="prettyprint linenums">
   &lt;JsonLayout&gt;
@@ -1019,8 +1030,10 @@ logger.debug(&quot;one={}, two={}, three
     &lt;KeyValuePair key=&quot;additionalField2&quot; value=&quot;$${ctx:key}&quot;/&gt;
   &lt;/JsonLayout&gt;
 </pre></div>
-              Custom fields are always last, in the order they are declared.
           
+<p>
+              Custom fields are always last, in the order they are declared. The values support <a href="lookups.html">lookups</a>.
+          </p>
           
 <p>
             Additional <a href="../runtime-dependencies.html">runtime dependencies</a> are required for using JsonLayout.
@@ -3626,7 +3639,8 @@ at org.apache.logging.log4j.core.pattern
           
 <p>
               To include any custom field in the output, use following syntax:
-              </p>
+          </p>
+              
 <div>
 <pre class="prettyprint linenums">
   &lt;XmlLayout&gt;
@@ -3634,8 +3648,10 @@ at org.apache.logging.log4j.core.pattern
     &lt;KeyValuePair key=&quot;additionalField2&quot; value=&quot;$${ctx:key}&quot;/&gt;
   &lt;/XmlLayout&gt;
 </pre></div>
-              Custom fields are always last, in the order they are declared.
           
+<p>
+              Custom fields are always last, in the order they are declared.  The values support <a href="lookups.html">lookups</a>.
+          </p>
           
 <p>
             Additional <a href="../runtime-dependencies.html">runtime dependencies</a> are required for using XmlLayout.
@@ -3773,7 +3789,8 @@ source:
           
 <p>
               To include any custom field in the output, use following syntax:
-              </p>
+          </p>
+              
 <div>
 <pre class="prettyprint linenums">
   &lt;YamlLayout&gt;
@@ -3781,8 +3798,10 @@ source:
     &lt;KeyValuePair key=&quot;additionalField2&quot; value=&quot;$${ctx:key}&quot;/&gt;
   &lt;/YamlLayout&gt;
 </pre></div>
-              Custom fields are always last, in the order they are declared.
           
+<p>
+              Custom fields are always last, in the order they are declared.  The values support <a href="lookups.html">lookups</a>.
+          </p>
           
 <p>
             Additional <a href="../runtime-dependencies.html">runtime dependencies</a> are required for using YamlLayout.