You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2017/03/08 03:58:15 UTC
[09/11] logging-log4j2 git commit: [LOG4J2-1838]: Add documentation
about throwable suffix() option
[LOG4J2-1838]: Add documentation about throwable suffix() option
Also added notes about related missing documentation.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/f14eadfb
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/f14eadfb
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/f14eadfb
Branch: refs/heads/master
Commit: f14eadfb7b49211c282434e5a81ba5b850f7a5bb
Parents: 4e47b38
Author: Matt Sicker <bo...@gmail.com>
Authored: Tue Mar 7 21:57:57 2017 -0600
Committer: Matt Sicker <bo...@gmail.com>
Committed: Tue Mar 7 21:58:12 2017 -0600
----------------------------------------------------------------------
src/site/xdoc/manual/layouts.xml.vm | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/f14eadfb/src/site/xdoc/manual/layouts.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/layouts.xml.vm b/src/site/xdoc/manual/layouts.xml.vm
index 695c930..6fff0cb 100644
--- a/src/site/xdoc/manual/layouts.xml.vm
+++ b/src/site/xdoc/manual/layouts.xml.vm
@@ -762,7 +762,10 @@ WARN [main]: Message 2</pre>
|"short.lineNumber"<br />
|"short.methodName"<br />
|"short.message"<br />
- |"short.localizedMessage"]}
+ |"short.localizedMessage"]}<br />
+ {suffix(<i>pattern</i>)}
+ <!-- TODO: there are actually more options available in ThrowableFormatOptions that apply here -->
+ <!-- separator(), filters(), and ansi() -->
</td>
<td>
<p>
@@ -799,6 +802,11 @@ WARN [main]: Message 2</pre>
<p>
Specifying <b>%throwable{none}</b> or <b>%throwable{0}</b> suppresses output of the exception.
</p>
+ <p>
+ Specifying <b>%throwable{suffix{<i>pattern</i>}</b> adds the output of <i>pattern</i> to the
+ output only if there is a throwable to print. This option is orthogonal with the above
+ conversions.
+ </p>
</td>
</tr>
<tr>
@@ -1223,9 +1231,11 @@ WARN [main]: Message 2</pre>
<tr>
<td align="center">
<a name="PatternException"/>
- <b>rEx</b>["none"|"short"|"full"|depth],[filters(packages)}<br />
- <b>rException</b>["none"|"short"|"full"|depth],[filters(packages)}<br />
- <b>rThrowable</b>["none"|"short"|"full"|depth],[filters(packages)}
+ <b>rEx</b>{["none"|"short"|"full"|depth]}{[filters(packages)]}{suffix(<i>pattern</i>)}<br />
+ <b>rException</b>{["none"|"short"|"full"|depth]}{[filters(packages)]}{suffix(<i>pattern</i>)}<br />
+ <b>rThrowable</b>{["none"|"short"|"full"|depth]}{[filters(packages)]}{suffix(<i>pattern</i>)}
+ <!-- TODO: more options are available in ThrowableFormatOptions -->
+ <!-- FIXME: these options are confusing! -->
</td>
<td>
<p>The same as the %throwable conversion word but the stack trace is printed starting with the
@@ -1239,6 +1249,10 @@ WARN [main]: Message 2</pre>
be suppressed from stack traces. Specifying <b>%rEx{none}</b>
or <b>%rEx{0}</b> will suppress printing of the exception.
</p>
+ <p>
+ As with the %throwable conversion, using <b>rEx{suffix(<i>pattern</i>)</b> will add the output
+ of <i>pattern</i> to the output only if there is a throwable to print.
+ </p>
</td>
</tr>
<tr>
@@ -1468,6 +1482,7 @@ WARN [main]: Message 2</pre>
Key=Value,Value,...<br/>
...)<br/>
}<br/>
+ {suffix(<i>pattern</i>)}<br/>
</td>
<td>
<p>The same as the %throwable conversion word but also includes class packaging information.
@@ -1524,6 +1539,10 @@ WARN [main]: Message 2</pre>
The special key <code>StyleMapName</code> can be set to one of the following prefedined maps:
<code>Spock</code>, <code>Kirk</code>.
</p>
+ <p>
+ As with %throwable, the <b>%xEx{suffix(<i>pattern</i>)</b> conversion will add the output of
+ <i>pattern</i> to the output only if there is a throwable to print.
+ </p>
</td>
</tr>
<tr>