You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ni...@apache.org on 2013/07/21 07:14:50 UTC

svn commit: r1505274 - in /logging/log4j/log4j2/trunk/src: changes/changes.xml site/xdoc/manual/layouts.xml.vm

Author: nickwilliams
Date: Sun Jul 21 05:14:50 2013
New Revision: 1505274

URL: http://svn.apache.org/r1505274
Log:
Documenting the alwaysWriteExceptions attribute in the PatternLayout.

Modified:
    logging/log4j/log4j2/trunk/src/changes/changes.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1505274&r1=1505273&r2=1505274&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sun Jul 21 05:14:50 2013
@@ -76,7 +76,9 @@
       </action>
       <action dev="nickwilliams" type="update">
         Changed the (relatively new) PatternLayout configuration attribute "suppressExceptions" to
-        "alwaysWriteExceptions" to more correctly indicate what it does. No behavior change.
+        "alwaysWriteExceptions" to more correctly indicate what it does. As such, the meaning of this attribute has
+        reversed (previous "true"s should become "false"s, and vice versa). Since this was an undocumented attribute up
+        until now, it's unlikely this change will affect any users.
       </action>
     </release>
     <release version="2.0-beta8" date="2013-07-10" description="Bug fixes and enhancements">

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm?rev=1505274&r1=1505273&r2=1505274&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm Sun Jul 21 05:14:50 2013
@@ -132,7 +132,7 @@ WARN  [main]: Message 2</pre>
             <tr>
               <td>pattern</td>
               <td>String</td>
-              <td></td>
+              <td>A composite pattern string of one or more conversion patterns from the table below.</td>
             </tr>
             <tr>
               <td>replace</td>
@@ -143,7 +143,36 @@ WARN  [main]: Message 2</pre>
                 applies to the String its pattern generates.
               </td>
             </tr>
-            <caption align="top">Pattern Layout Parameters</caption>
+            <tr>
+              <td>alwaysWriteExceptions</td>
+              <td>boolean</td>
+              <td>If <code>true</code> (it is by default) exceptions are always written even if the pattern contains no
+                exception conversions. This means that if you do not include a way to output exceptions in your pattern,
+                the default exception formatter will be added to the end of the pattern. Setting this to
+                <code>false</code> disables this behavior and allows you to exclude exceptions from your pattern
+                output.</td>
+            </tr>
+            <caption align="top">PatternLayout Parameters</caption>
+          </table>
+          <table>
+            <tr>
+              <th>Parameter Name</th>
+              <th>Type</th>
+              <th>Description</th>
+            </tr>
+            <tr>
+              <td>regex</td>
+              <td>String</td>
+              <td>A Java-compliant regular expression to match in the resulting string. See
+                <a href="http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html"
+                   target="_blank">java.util.regex.Pattern</a>.</td>
+            </tr>
+            <tr>
+              <td>replacement</td>
+              <td>String</td>
+              <td>The string to replace any matched sub-strings with.</td>
+            </tr>
+            <caption align="top">RegexReplacement Parameters</caption>
           </table>
           <h4>Patterns</h4>
           <p>The conversions that are provided with Log4j are:
@@ -1056,7 +1085,7 @@ at org.apache.logging.log4j.core.pattern
                 specified. To use, include a &gt;LoggerFields&lt; nested element, containing one or more
                 &gt;KeyValuePair&lt; elements. Each &gt;KeyValuePair&lt; must have a key attribute, which
                 specifies the key name which will be used to identify the field within the MDC Structured Data element,
-                and a value attribute, whcih specifies the PatternLayout pattern to use as the value.</td>
+                and a value attribute, which specifies the PatternLayout pattern to use as the value.</td>
             </tr>
             <tr>
               <td>mdcExcludes</td>