You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2015/06/14 03:17:39 UTC

logging-log4j2 git commit: LOG4J2-1050: added docs for Log4jLookup to Lookups manual page and side nav menu; fixed configuration page (velocity templates use $ for variable names, so literal '$'s must be escaped)

Repository: logging-log4j2
Updated Branches:
  refs/heads/master cd3f2b2df -> 3d925064e


LOG4J2-1050: added docs for Log4jLookup to Lookups manual page and side
nav menu; fixed configuration page (velocity templates use $ for
variable names, so literal '$'s must be escaped)

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3d925064
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3d925064
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3d925064

Branch: refs/heads/master
Commit: 3d925064e73297e61078334f528a959482733f11
Parents: cd3f2b2
Author: rpopma <rp...@apache.org>
Authored: Sun Jun 14 10:17:36 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jun 14 10:17:36 2015 +0900

----------------------------------------------------------------------
 src/site/site.xml                         |  1 +
 src/site/xdoc/manual/configuration.xml.vm |  4 +++-
 src/site/xdoc/manual/lookups.xml          | 18 ++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3d925064/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index fb7030f..3bbf745 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -101,6 +101,7 @@
         <item name="Java" href="/manual/lookups.html#JavaLookup"/>
         <item name="JNDI" href="/manual/lookups.html#JndiLookup"/>
         <item name="JVM Arguments" href="/manual/lookups.html#JmxRuntimeInputArgumentsLookup"/>
+        <item name="Log4j Config" href="/manual/lookups.html#Log4jConfigLookup"/>
         <item name="Main Arguments" href="/manual/lookups.html#AppMainArgsLookup"/>
         <item name="Map" href="/manual/lookups.html#MapLookup"/>
         <item name="Structured Data" href="/manual/lookups.html#StructuredDataLookup"/>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3d925064/src/site/xdoc/manual/configuration.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm
index 30f0f00..a4c0e20 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -905,7 +905,9 @@ public class Bar {
               </tr>
               <tr>
                 <td>log4j</td>
-                <td>Log4j configuration properties. The expressions <code>${log4j:configLocation}</code> and <code>${log4j:configParentLocation}</code> respectively provide the absolute path to the log4j configuration file and its parent folder.</td>
+                <td>Log4j configuration properties. The expressions <code>${dollar}{log4j:configLocation}</code> and
+                  <code>${dollar}{log4j:configParentLocation}</code> respectively provide the absolute path
+                  to the log4j configuration file and its parent folder.</td>
               </tr>
               <tr>
                 <td>main</td>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3d925064/src/site/xdoc/manual/lookups.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/lookups.xml b/src/site/xdoc/manual/lookups.xml
index 4991945..18c508f 100644
--- a/src/site/xdoc/manual/lookups.xml
+++ b/src/site/xdoc/manual/lookups.xml
@@ -176,6 +176,24 @@
           </p>
           <p><strong>Java's JMX module is not available on Android.</strong></p>
         </subsection>
+        <a name="Log4jConfigLookup"/>
+        <subsection name="Log4j Configuration Location Lookup">
+          <p>
+            Log4j configuration properties. The expressions 
+            <code>${log4j:configLocation}</code> and <code>${log4j:configParentLocation}</code>
+            respectively provide the absolute path to the log4j configuration file
+            and its parent folder.
+          </p><p>
+            The example below uses this lookup to place log files in a directory relative
+            to the log4j configuration file.
+          </p>
+          <pre class="prettyprint linenums"><![CDATA[
+<File name="Application" fileName="${log4j:configParentLocation}/logs/application.log">
+  <PatternLayout>
+    <pattern>%d %p %c{1.} [%t] %m%n</pattern>
+  </PatternLayout>
+</File>]]></pre>
+        </subsection>
         <a name="AppMainArgsLookup"/>
         <subsection name="Main Arguments Lookup (Application)">
           <p>