You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2014/09/23 06:44:32 UTC
git commit: [LOG4J2-848] Add a Java lookup to provide nicely
formatted runtime version information. Add site docs on the lookout page.
Repository: logging-log4j2
Updated Branches:
refs/heads/master cf2d8a64b -> b701951e8
[LOG4J2-848] Add a Java lookup to provide nicely formatted runtime
version information. Add site docs on the lookout page.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b701951e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b701951e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b701951e
Branch: refs/heads/master
Commit: b701951e82eda1d21367631ae837cb39670f4b6e
Parents: cf2d8a6
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Sep 23 00:44:26 2014 -0400
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Sep 23 00:44:26 2014 -0400
----------------------------------------------------------------------
src/site/xdoc/manual/lookups.xml | 64 +++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b701951e/src/site/xdoc/manual/lookups.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/lookups.xml b/src/site/xdoc/manual/lookups.xml
index f80ec54..0137550 100644
--- a/src/site/xdoc/manual/lookups.xml
+++ b/src/site/xdoc/manual/lookups.xml
@@ -95,6 +95,70 @@
</PatternLayout>
</File>]]></pre>
</subsection>
+ <subsection name="JavaLookup">
+ <a name="JavaLookup"/>
+ <p>
+ The JavaLookup allows Java environment information to be retrieved in convenient preformatted strings
+ using the <code>java:</code> prefix.
+ </p>
+ <table>
+ <tr>
+ <th>Key</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>version</td>
+ <td>
+ <p>The short Java version, like:</p>
+ <p><code>Java version 1.7.0_67</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>runtime</td>
+ <td>
+ <p>The Java runtime version, like:</p>
+ <p><code>Java(TM) SE Runtime Environment (build 1.7.0_67-b01) from Oracle Corporation</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>vm</td>
+ <td>
+ <p>The Java VM version, like:</p>
+ <p><code>Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>os</td>
+ <td>
+ <p>The OS version, like:</p>
+ <p><code>Windows 7 6.1 Service Pack 1, architecture: amd64-64</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>locale</td>
+ <td>
+ <p>Hardware information, like:</p>
+ <p><code>default locale: en_US, platform encoding: Cp1252</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>hw</td>
+ <td>
+ <p>Hardware information, like:</p>
+ <p><code>processors: 4, architecture: amd64-64, instruction sets: amd64</code></p>
+ </td>
+ </tr>
+ </table>
+ <p>
+ For example:
+ </p>
+ <pre class="prettyprint linenums"><![CDATA[
+<File name="Application" fileName="application.log">
+ <PatternLayout header="${java:runtime} - ${java:vm} - ${java:os}">
+ <Pattern>%d %m%n</Pattern>
+ </PatternLayout>
+</File>]]></pre>
+ </subsection>
<subsection name="MapLookup">
<a name="MapLookup"/>
<p>