Author: cbrisson Date: Fri Nov 11 20:41:38 2016 New Revision: 1769342 URL: http://svn.apache.org/viewvc?rev=1769342&view=rev Log: [site] document logging reeng (production)
Modified: velocity/site/production/css/site.css velocity/site/production/engine/2.0/developer-guide.html velocity/site/production/engine/2.0/upgrading.html velocity/site/production/engine/devel/changes.html velocity/site/production/engine/devel/developer-guide.html velocity/site/production/engine/devel/upgrading.html Modified: velocity/site/production/css/site.css URL: http://svn.apache.org/viewvc/velocity/site/production/css/site.css?rev=1769342&r1=1769341&r2=1769342&view=diff ============================================================================== --- velocity/site/production/css/site.css (original) +++ velocity/site/production/css/site.css Fri Nov 11 20:41:38 2016 @@ -156,7 +156,7 @@ ol, ul, dd li, dt, dd { - margin: 0; + margin: 0 0 0.2em 0; } li > ul, li > ol, dd > dl @@ -213,7 +213,7 @@ a > img #leftnav h2 { margin: 0.1em 0 0.1em 0; font-size: 1.1em;} #leftnav a.headerlink { display: none; } #leftnav ul { list-style: none; padding-left: 0; margin: 0.1em 0 0.4em 0; } -#leftnav li { line-height: 1.2em; } +#leftnav li { line-height: 1.2em; margin: 0; } #bottom-nav { text-align: center; } #bottom-nav img { margin: 0.2em 0; } Modified: velocity/site/production/engine/2.0/developer-guide.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/developer-guide.html?rev=1769342&r1=1769341&r2=1769342&view=diff ============================================================================== --- velocity/site/production/engine/2.0/developer-guide.html (original) +++ velocity/site/production/engine/2.0/developer-guide.html Fri Nov 11 20:41:38 2016 @@ -739,7 +739,16 @@ velocityEngine.init(); <h2 id="logging">Logging<a class="headerlink" href="#logging" title="Permanent link">¶</a></h2> <p>Since version 2.0, Velocity has switched to the <a href="http://www.slf4j.org/">SLF4J</a> logging facade.</p> <p>All you have to do to enable logging is to make sure that your classpath contains the slf4j-api jar, and one and only one slf4j binding jar towards your favourite logsystem or facade. See the <a href="#dependencies">dependecies</a> section for a list of SLF4J bindings.</p> -<p>By default, Velocity will use a logger tagged for the org.apache.velocity.app.Velocity class. You can customize this logger in two ways:</p> +<p>By default, Velocity will use a base logger named <code>org.apache.velocity</code>, and several children loggers (whose name is appended to the base logger name):</p> +<ul> +<li><code>directive</code>, and <code>directive.</code><em><code>[directivename]</code></em> for all logs related to VTL directives</li> +<li><code>parser</code> for parser logs</li> +<li><code>loader</code>, and <code>loader.</code><em><code>[loadername]</code></em> for resource loaders logs</li> +<li><code>macro</code> for macro-related logs</li> +<li><code>rendering</code> for everything related to actual rendering of templates, including introspection and method calls</li> +<li><code>event</code> for logs emitted by the event cartridge.</li> +</ul> +<p>You can customize this logger in two ways:</p> <ul> <li>By programmatically giving Velocity a living instance of an orf.slf4j.Logger object, using the runtime.log.instance property key.</li> <li>By configuring the name of the logger to be used by your velocity instance, using the runtime.log.name property key. It can be done from the velocity.properties file, if present.</li> Modified: velocity/site/production/engine/2.0/upgrading.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/upgrading.html?rev=1769342&r1=1769341&r2=1769342&view=diff ============================================================================== --- velocity/site/production/engine/2.0/upgrading.html (original) +++ velocity/site/production/engine/2.0/upgrading.html Fri Nov 11 20:41:38 2016 @@ -236,24 +236,21 @@ space.gobbling = bc <p>Read below for futher details.</p> <h3 id="behavior-api-changes">Behavior / API changes:<a class="headerlink" href="#behavior-api-changes" title="Permanent link">¶</a></h3> <ul> -<li>velocity is now using the SLF4J logging facade. Hence, all methods accepting or returning a logger now use the org.slf4j.Logger object.</li> +<li>velocity is now using the SLF4J logging facade. Hence, all methods accepting or returning a logger now use the org.slf4j.Logger object. Velocity uses a logger name of <code>org.apache.velocity</code> (configurable with the <code>runtime.log.name</code> configuration entry), and <a href="developer-guide.html#logging">several other childen loggers</a>.</li> <li>the internal Context API now enforces String keys everywhere, this may break custom Context implementations at compile-time.</li> -<li> -<p>invalid reference events are now more sparsely sent; they're not sent if <em>any</em> of the following conditions is met:</p> -<ul> +<li>invalid reference events are now more sparsely sent; they're not sent if <em>any</em> of the following conditions is met:<ul> <li>the reference is a quiet reference</li> <li>the reference could be successfully evaluated but resulted in a null value</li> -<li>the reference is tested for validity inside an #if / #elseif statement</li> +<li>the reference is tested for validity inside an #if / #elseif statement +The 1.x behavior did send invalid reference events in all those cases.</li> </ul> -<p>The 1.x behavior did send invalid reference events in all those cases.</p> -</li> -<li> -<p>The <code>ResourceLoader</code> class has been deprecated in favor of a <code>ResourceLoader2</code> class, in which the <code>InputStream ResourceLoader.getResourceStream(String name)</code> has been replaced by a <code>Reader ResourceLoader.getResourceReader(String name, String encoding)</code>. Since <code>ResourceLoader</code> inherits from <code>ResourceLoader2</code>, the change remains backward compatible, but custom resource loaders should be upgraded to avoid deprecattion warnings.</p> </li> +<li>The <code>ResourceLoader</code> class has been deprecated in favor of a <code>ResourceLoader2</code> class, in which the <code>InputStream ResourceLoader.getResourceStream(String name)</code> has been replaced by a <code>Reader ResourceLoader.getResourceReader(String name, String encoding)</code>. Since <code>ResourceLoader</code> inherits from <code>ResourceLoader2</code>, the change remains backward compatible, but custom resource loaders should be upgraded to avoid deprecattion warnings.</li> <li>the default encoding ('ISO-8859-1' in 1.x) is now read from the standard <code>file.encoding</code> Java system property.</li> <li>the MethodException event handler now receives an additional argument providing template name and location infos.</li> <li>all occurences of the class org.apache.commons.collections.ExtendedProperties in the initialization API have been replaced by org.apache.velocity.util.ExtProperties.</li> <li>the macros are now using a 'call by sharing' convention (which means that all arguments are evaluated once at start, and that the macro receives a copy of the reference to each argument).</li> +<li>the <code>UberspectLoggable</code> interface has been removed.</li> </ul> <h3 id="vtl-changes">VTL Changes:<a class="headerlink" href="#vtl-changes" title="Permanent link">¶</a></h3> <ul> Modified: velocity/site/production/engine/devel/changes.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/changes.html?rev=1769342&r1=1769341&r2=1769342&view=diff ============================================================================== --- velocity/site/production/engine/devel/changes.html (original) +++ velocity/site/production/engine/devel/changes.html Fri Nov 11 20:41:38 2016 @@ -317,6 +317,13 @@ h2:hover > .headerlink, h3:hover > .head <td> <img src="images/add.png"/> </td> + <td> Make Velocity use the base logger namespace 'org.apache.velocity' unless specified with runtime.log.name in the configuration, and have the runtime instance log with this base namespace, and other modules log with children namespaces: <ul> <li> directive, and velocity.directive.[directivename] </li> <li> parser </li> <li> loader and loader.[loadername] </li> <li> macro </li> <li> rendering </li> <li> event </li> </ul> Get rid of UberspectLoggable interface. . </td> + <td>cbrisson</td> + </tr> + <tr> + <td> + <img src="images/add.png"/> + </td> <td> Added unary negate math operator . </td> <td>cbrisson</td> </tr> Modified: velocity/site/production/engine/devel/developer-guide.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/developer-guide.html?rev=1769342&r1=1769341&r2=1769342&view=diff ============================================================================== --- velocity/site/production/engine/devel/developer-guide.html (original) +++ velocity/site/production/engine/devel/developer-guide.html Fri Nov 11 20:41:38 2016 @@ -739,7 +739,16 @@ velocityEngine.init(); <h2 id="logging">Logging<a class="headerlink" href="#logging" title="Permanent link">¶</a></h2> <p>Since version 2.0, Velocity has switched to the <a href="http://www.slf4j.org/">SLF4J</a> logging facade.</p> <p>All you have to do to enable logging is to make sure that your classpath contains the slf4j-api jar, and one and only one slf4j binding jar towards your favourite logsystem or facade. See the <a href="#dependencies">dependecies</a> section for a list of SLF4J bindings.</p> -<p>By default, Velocity will use a logger tagged for the org.apache.velocity.app.Velocity class. You can customize this logger in two ways:</p> +<p>By default, Velocity will use a base logger named <code>org.apache.velocity</code>, and several children loggers (whose name is appended to the base logger name):</p> +<ul> +<li><code>directive</code>, and <code>directive.</code><em><code>[directivename]</code></em> for all logs related to VTL directives</li> +<li><code>parser</code> for parser logs</li> +<li><code>loader</code>, and <code>loader.</code><em><code>[loadername]</code></em> for resource loaders logs</li> +<li><code>macro</code> for macro-related logs</li> +<li><code>rendering</code> for everything related to actual rendering of templates, including introspection and method calls</li> +<li><code>event</code> for logs emitted by the event cartridge.</li> +</ul> +<p>You can customize this logger in two ways:</p> <ul> <li>By programmatically giving Velocity a living instance of an orf.slf4j.Logger object, using the runtime.log.instance property key.</li> <li>By configuring the name of the logger to be used by your velocity instance, using the runtime.log.name property key. It can be done from the velocity.properties file, if present.</li> Modified: velocity/site/production/engine/devel/upgrading.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/upgrading.html?rev=1769342&r1=1769341&r2=1769342&view=diff ============================================================================== --- velocity/site/production/engine/devel/upgrading.html (original) +++ velocity/site/production/engine/devel/upgrading.html Fri Nov 11 20:41:38 2016 @@ -236,24 +236,21 @@ space.gobbling = bc <p>Read below for futher details.</p> <h3 id="behavior-api-changes">Behavior / API changes:<a class="headerlink" href="#behavior-api-changes" title="Permanent link">¶</a></h3> <ul> -<li>velocity is now using the SLF4J logging facade. Hence, all methods accepting or returning a logger now use the org.slf4j.Logger object.</li> +<li>velocity is now using the SLF4J logging facade. Hence, all methods accepting or returning a logger now use the org.slf4j.Logger object. Velocity uses a logger name of <code>org.apache.velocity</code> (configurable with the <code>runtime.log.name</code> configuration entry), and <a href="developer-guide.html#logging">several other childen loggers</a>.</li> <li>the internal Context API now enforces String keys everywhere, this may break custom Context implementations at compile-time.</li> -<li> -<p>invalid reference events are now more sparsely sent; they're not sent if <em>any</em> of the following conditions is met:</p> -<ul> +<li>invalid reference events are now more sparsely sent; they're not sent if <em>any</em> of the following conditions is met:<ul> <li>the reference is a quiet reference</li> <li>the reference could be successfully evaluated but resulted in a null value</li> -<li>the reference is tested for validity inside an #if / #elseif statement</li> +<li>the reference is tested for validity inside an #if / #elseif statement +The 1.x behavior did send invalid reference events in all those cases.</li> </ul> -<p>The 1.x behavior did send invalid reference events in all those cases.</p> -</li> -<li> -<p>The <code>ResourceLoader</code> class has been deprecated in favor of a <code>ResourceLoader2</code> class, in which the <code>InputStream ResourceLoader.getResourceStream(String name)</code> has been replaced by a <code>Reader ResourceLoader.getResourceReader(String name, String encoding)</code>. Since <code>ResourceLoader</code> inherits from <code>ResourceLoader2</code>, the change remains backward compatible, but custom resource loaders should be upgraded to avoid deprecattion warnings.</p> </li> +<li>The <code>ResourceLoader</code> class has been deprecated in favor of a <code>ResourceLoader2</code> class, in which the <code>InputStream ResourceLoader.getResourceStream(String name)</code> has been replaced by a <code>Reader ResourceLoader.getResourceReader(String name, String encoding)</code>. Since <code>ResourceLoader</code> inherits from <code>ResourceLoader2</code>, the change remains backward compatible, but custom resource loaders should be upgraded to avoid deprecattion warnings.</li> <li>the default encoding ('ISO-8859-1' in 1.x) is now read from the standard <code>file.encoding</code> Java system property.</li> <li>the MethodException event handler now receives an additional argument providing template name and location infos.</li> <li>all occurences of the class org.apache.commons.collections.ExtendedProperties in the initialization API have been replaced by org.apache.velocity.util.ExtProperties.</li> <li>the macros are now using a 'call by sharing' convention (which means that all arguments are evaluated once at start, and that the macro receives a copy of the reference to each argument).</li> +<li>the <code>UberspectLoggable</code> interface has been removed.</li> </ul> <h3 id="vtl-changes">VTL Changes:<a class="headerlink" href="#vtl-changes" title="Permanent link">¶</a></h3> <ul>