velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1700798 [1/2] - in /velocity/tools/trunk: src/site/xdoc/ test/conf/ velocity-tools-assembly/ velocity-tools-examples/ velocity-tools-examples/displaytag-directive/ velocity-tools-examples/velocity-tools-examples-showcase/ velocity-tools-ex...
Date Wed, 02 Sep 2015 12:57:22 GMT
Author: cbrisson
Date: Wed Sep  2 12:57:21 2015
New Revision: 1700798

URL: http://svn.apache.org/r1700798
Log:
[tools] switch to SLF4J logging facade

Added:
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java
      - copied, changed from r1696835, velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogChute.java
Removed:
    velocity/tools/trunk/test/conf/commons-logging.properties
    velocity/tools/trunk/velocity-tools-examples/displaytag-directive/
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/displaytag/
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/jsp.vm
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/log/LogChuteCommonsLog.java
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogChute.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ServletLogChute.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/tools/
    velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/test/FilteredLogChuteCommonsLog.java
Modified:
    velocity/tools/trunk/src/site/xdoc/changes.xml
    velocity/tools/trunk/src/site/xdoc/dependencies.xml
    velocity/tools/trunk/src/site/xdoc/view.xml
    velocity/tools/trunk/velocity-tools-assembly/pom.xml
    velocity/tools/trunk/velocity-tools-examples/pom.xml
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/resources/NOTICE
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/WEB-INF/velocity.properties
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/layout/Default.vm
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-simple/pom.xml
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-struts/pom.xml
    velocity/tools/trunk/velocity-tools-generic/pom.xml
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolManager.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/FileFactoryConfiguration.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/LogSupport.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/BaseTestCase.java
    velocity/tools/trunk/velocity-tools-struts/pom.xml
    velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/MessageResourcesTool.java
    velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/StrutsLinkTool.java
    velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/TilesTool.java
    velocity/tools/trunk/velocity-tools-uberjar/pom.xml
    velocity/tools/trunk/velocity-tools-view-jsp/pom.xml
    velocity/tools/trunk/velocity-tools-view/pom.xml
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/CookieTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportSupport.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UiDependencyTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java
    velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/test/blackbox/LinkToolTests.java
    velocity/tools/trunk/velocity-tools-xml/pom.xml
    velocity/tools/trunk/velocity-tools-xml/src/main/java/org/apache/velocity/tools/generic/XmlTool.java

Modified: velocity/tools/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/site/xdoc/changes.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/src/site/xdoc/changes.xml (original)
+++ velocity/tools/trunk/src/site/xdoc/changes.xml Wed Sep  2 12:57:21 2015
@@ -28,14 +28,14 @@
   <section name="VelocityTools Changes">
     <p>This document tracks the changes in VelocityTools between releases.</p>
 
-    <subsection name="2.1-SNAPSHOT">
-        <p>This section describes changes after the 2.0 release.</p>
+    <subsection name="3.0-SNAPSHOT">
+        <p>This section describes changes after the 2.x series.</p>
         <ul>
         <li>Switched engine dependency to 2.0 (cb)</li>
         <li>Reflect Velocity Engine dependency shading of commons-lang and commons-collections (cb)</li>
         <li>Removed deprecated class org.apache.velocity.tools.generic.log.LogSystemCommonsLog (cb)</li>
         <li>MathTool: fixed result type calculations and added bitwise operations (cb)</li>
-        <li>have session scoped tools use a static logger to fix J2EE containers session serialization (cb)</li>
+        <li>Switched log system facade to SLF4j (cb)</li>
         </ul>
     </subsection>
 

Modified: velocity/tools/trunk/src/site/xdoc/dependencies.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/site/xdoc/dependencies.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/src/site/xdoc/dependencies.xml (original)
+++ velocity/tools/trunk/src/site/xdoc/dependencies.xml Wed Sep  2 12:57:21 2015
@@ -64,12 +64,18 @@
               </td>
             </tr>
             <tr>
-              <td>commons-logging</td>
-              <td>1.1</td>
+              <td>slf4j-api</td>
+              <td>1.7.2+</td>
+              <td>Yes</td>
+              <td>Yes</td>
+              <td>Required for Velocity Engine
+            </tr>
+            <tr>
+              <td>jcl-over-slf4j.jar</td>
+              <td>1.7.12</td>
               <td>Yes</td>
               <td>Yes</td>
-              <td>Required for Digester and
-                <a href="javadoc/org/apache/velocity/tools/generic/log/LogChuteCommonsLog.html">LogChuteCommonsLog</a></td>
+              <td>Required for Digester</td>
             </tr>
             <tr>
               <td>dom4j</td>
@@ -80,15 +86,8 @@
                 <a href="javadoc/org/apache/velocity/tools/generic/XmlTool.html">XmlTool</a></td>
             </tr>
             <tr>
-              <td>oro</td>
-              <td>2.0+</td>
-              <td>No</td>
-              <td>No</td>
-              <td>A Velocity dependency (only used by certain EventHandlers)</td>
-            </tr>
-            <tr>
               <td>velocity</td>
-              <td>1.5</td>
+              <td>2.0+</td>
               <td>Yes</td>
               <td>Yes</td>
               <td>Required for core infrastructure,
@@ -133,12 +132,18 @@
               </td>
             </tr>
             <tr>
-              <td>commons-logging</td>
-              <td>1.1</td>
+              <td>slf4j-api</td>
+              <td>1.7.2+</td>
+              <td>Yes</td>
               <td>Yes</td>
+              <td>Required for Velocity Engine
+            </tr>
+            <tr>
+              <td>jcl-over-slf4j.jar</td>
+              <td>1.7.12</td>
               <td>Yes</td>
-              <td>Required for Digester and
-                <a href="javadoc/org/apache/velocity/tools/generic/log/LogChuteCommonsLog.html">LogChuteCommonsLog</a></td>
+              <td>Yes</td>
+              <td>Required for Digester</td>
             </tr>
             <tr>
               <td>dom4j</td>
@@ -149,13 +154,6 @@
                 <a href="javadoc/org/apache/velocity/tools/generic/XmlTool.html">XmlTool</a></td>
             </tr>
             <tr>
-              <td>oro</td>
-              <td>2.0+</td>
-              <td>No</td>
-              <td>No</td>
-              <td>A Velocity dependency (only used by certain EventHandlers)</td>
-            </tr>
-            <tr>
               <td>servletapi</td>
               <td>2.3</td>
               <td>Yes</td>
@@ -168,7 +166,7 @@
             </tr>
             <tr>
               <td>velocity</td>
-              <td>1.5</td>
+              <td>2.0+</td>
               <td>Yes</td>
               <td>Yes</td>
               <td>Required for core infrastructure,
@@ -224,11 +222,18 @@
               </td>
             </tr>
             <tr>
-              <td>commons-logging</td>
-              <td>1.1</td>
+              <td>slf4j-api</td>
+              <td>1.7.2+</td>
+              <td>Yes</td>
+              <td>Yes</td>
+              <td>Required for Velocity Engine
+            </tr>
+            <tr>
+              <td>jcl-over-slf4j.jar</td>
+              <td>1.7.12</td>
               <td>Yes</td>
               <td>Yes</td>
-              <td>Required for Struts, Digester, and LogChuteCommonsLog</td>
+              <td>Required for Digester</td>
             </tr>
             <tr>
               <td>dom4j</td>
@@ -288,13 +293,6 @@
               </td>
             </tr>
             <tr>
-              <td>oro</td>
-              <td>2.0+</td>
-              <td>No</td>
-              <td>No</td>
-              <td>A Velocity dependency (only used by certain EventHandlers)</td>
-            </tr>
-            <tr>
               <td>servletapi</td>
               <td>2.3</td>
               <td>Yes</td>
@@ -309,7 +307,7 @@
             </tr>
             <tr>
               <td>velocity</td>
-              <td>1.5</td>
+              <td>2.0+</td>
               <td>Yes</td>
               <td>Yes</td>
               <td>Required for core infrastructure,

Modified: velocity/tools/trunk/src/site/xdoc/view.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/site/xdoc/view.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/src/site/xdoc/view.xml (original)
+++ velocity/tools/trunk/src/site/xdoc/view.xml Wed Sep  2 12:57:21 2015
@@ -194,26 +194,6 @@
         
         <p>You can also use the embedded servlet runner to start and stop the showcase webapp on localhost's 8081 port using the <b>start.showcase.webapp</b> and <b>stop.showcase.webapp</b> ant targets.</p>
     </section>
-
-    <section name="Known Issues">
-        <p>
-          Since Tomcat 5.5 used commons-logging as a complete
-          logging facility and the Struts example directs commons-logging
-          output to the servlet log via LogChuteCommonsLog, you will
-          get an infinite loop if you try to run the Struts example on
-          Tomcat 5.5.  To fix this, upgrade to Tomcat 6.x or delete
-          the commons-logging.properties file from the Struts example's
-          classpath root.
-        </p>
-        <p>
-          You may, of course, experience the same thing if you are running
-          your web application on Tomcat 5.5 and decide to
-          use LogChuteCommonsLog for commons-logging and
-          stick with the ServletLogChute (the default) for Velocity(Tools)
-          logging. You will have to change one of these two settings or
-          else upgrade your servlet engine.
-        </p>
-    </section>
     </body>
 
 </document>

Modified: velocity/tools/trunk/velocity-tools-assembly/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-assembly/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-assembly/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-assembly/pom.xml Wed Sep  2 12:57:21 2015
@@ -4,11 +4,11 @@
     <parent>
         <artifactId>velocity-tools-parent</artifactId>
         <groupId>org.apache.velocity</groupId>
-        <version>2.1.0-SNAPSHOT</version>
+        <version>3.0-SNAPSHOT</version>
     </parent>
     <groupId>org.apache.velocity</groupId>
     <artifactId>velocity-tools-assembly</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Velocity Tools - Assembly</name>
     <description>Assembly building for Velocity Tools.</description>
@@ -22,7 +22,7 @@
                     <descriptors>
                         <descriptor>src/main/assembly/all.xml</descriptor>
                     </descriptors>
-                    <finalName>velocity-tools-${version}</finalName>
+                    <finalName>velocity-tools-${project.version}</finalName>
                     <tarLongFileMode>gnu</tarLongFileMode>
                 </configuration>
             </plugin>
@@ -40,49 +40,49 @@
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-uberjar</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>jar</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-view-jsp</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>jar</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-xml</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>jar</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-struts</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>jar</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-examples-simple</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>war</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-examples-showcase</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>war</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-examples-struts</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
             <type>war</type>
             <scope>compile</scope>
         </dependency>
@@ -163,7 +163,7 @@
                                 <configuration>
                                     <fromDir>${project.build.directory}/assemblies</fromDir>
                                     <includes>**</includes>
-                                    <toDir>${pom.version}</toDir>
+                                    <toDir>${project.version}</toDir>
                                     <serverId>apache.build</serverId>
                                     <url>scp://people.apache.org/www/people.apache.org/builds/velocity</url>
                                 </configuration>

Modified: velocity/tools/trunk/velocity-tools-examples/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-examples/pom.xml Wed Sep  2 12:57:21 2015
@@ -3,11 +3,11 @@
   <parent>
     <artifactId>velocity-tools-parent</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-examples</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>3.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>Apache Velocity Tools - Examples</name>
   <description>Examples to show how to use Velocity Tools</description>
@@ -15,6 +15,5 @@
   	<module>velocity-tools-examples-showcase</module>
   	<module>velocity-tools-examples-simple</module>
   	<module>velocity-tools-examples-struts</module>
-  	<module>displaytag-directive</module>
   </modules>
-</project>
\ No newline at end of file
+</project>

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml Wed Sep  2 12:57:21 2015
@@ -4,11 +4,11 @@
     <parent>
         <artifactId>velocity-tools-examples</artifactId>
         <groupId>org.apache.velocity</groupId>
-        <version>2.1.0-SNAPSHOT</version>
+        <version>3.0-SNAPSHOT</version>
     </parent>
     <groupId>org.apache.velocity</groupId>
     <artifactId>velocity-tools-examples-showcase</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
     <packaging>war</packaging>
     <name>Apache Velocity Tools Examples - Showcase</name>
     <description>Showcase of features in Velocity Tools.</description>
@@ -64,7 +64,7 @@
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-view</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
@@ -87,13 +87,13 @@
         <dependency>
         	<groupId>org.apache.velocity</groupId>
         	<artifactId>velocity-tools-xml</artifactId>
-        	<version>2.1.0-SNAPSHOT</version>
+        	<version>3.0-SNAPSHOT</version>
         	<scope>runtime</scope>
         </dependency>
         <dependency>
         	<groupId>org.apache.velocity</groupId>
         	<artifactId>velocity-tools-view-jsp</artifactId>
-        	<version>2.1.0-SNAPSHOT</version>
+        	<version>3.0-SNAPSHOT</version>
         	<type>jar</type>
         	<scope>compile</scope>
         </dependency>
@@ -109,10 +109,5 @@
         	<type>jar</type>
         	<scope>provided</scope>
         </dependency>
-        <dependency>
-        	<groupId>org.apache.velocity</groupId>
-        	<artifactId>displaytag-directive</artifactId>
-        	<version>2.1.0-SNAPSHOT</version>
-        </dependency>
     </dependencies>
 </project>

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/resources/NOTICE
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/resources/NOTICE?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/resources/NOTICE (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/resources/NOTICE Wed Sep  2 12:57:21 2015
@@ -11,7 +11,3 @@ the sslext library package, which is ope
 under the Apache Software License 1.1 with copyright attributed
 to The Apache Software Foundation.
 This software is available from http://sslext.sourceforge.net/
-
-This package contains Display Tag Library:
-  http://www.displaytag.org/
-distributed under the Artistic License. See DISPLAYTAG-LICENSE.txt

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/WEB-INF/velocity.properties
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/WEB-INF/velocity.properties?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/WEB-INF/velocity.properties (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/WEB-INF/velocity.properties Wed Sep  2 12:57:21 2015
@@ -31,10 +31,3 @@ tools.view.servlet.layout.directory = la
 # relative to the layout directory
 # NOT relative to the root directory of the webapp!
 tools.view.servlet.layout.default.template =  Default.vm
-
-userdirective=org.apache.velocity.tools.examples.displaytag.CaptionTagDirective,\
-  org.apache.velocity.tools.examples.displaytag.ColumnTagDirective,\
-  org.apache.velocity.tools.examples.displaytag.SetPropertyTagDirective,\
-  org.apache.velocity.tools.examples.displaytag.TableFooterTagDirective,\
-  org.apache.velocity.tools.examples.displaytag.TableTagDirective
-

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/layout/Default.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/layout/Default.vm?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/layout/Default.vm (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/webapp/layout/Default.vm Wed Sep  2 12:57:21 2015
@@ -19,7 +19,6 @@
 "http://www.w3.org/TR/html4/strict.dtd">
 
 #set( $stylesheet = '/layout/layout.css' )
-#set( $displayTagStylesheet = '/displaytag/css/displaytag.css' )
 #set( $css = $text.css )
 #parse( 'header.vm' )
 

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-simple/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-simple/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-simple/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-simple/pom.xml Wed Sep  2 12:57:21 2015
@@ -3,11 +3,11 @@
   <parent>
     <artifactId>velocity-tools-examples</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-examples-simple</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>3.0-SNAPSHOT</version>
   <packaging>war</packaging>
   <name>Apache Velocity Tools Examples - Simple</name>
   <description>Simple webapp based on Velocity Tools</description>
@@ -18,7 +18,7 @@
   	<dependency>
   		<groupId>org.apache.velocity</groupId>
   		<artifactId>velocity-tools-view-jsp</artifactId>
-  		<version>2.1.0-SNAPSHOT</version>
+  		<version>3.0-SNAPSHOT</version>
   	</dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-struts/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-struts/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-struts/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-struts/pom.xml Wed Sep  2 12:57:21 2015
@@ -3,11 +3,11 @@
   <parent>
     <artifactId>velocity-tools-examples</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-examples-struts</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>3.0-SNAPSHOT</version>
   <packaging>war</packaging>
   <name>Apache Velocity Tools Examples - Struts</name>
   <description>Webapp based on Velocity Tools - Struts support.</description>
@@ -24,13 +24,13 @@
   	<dependency>
   		<groupId>org.apache.velocity</groupId>
   		<artifactId>velocity-tools-struts</artifactId>
-  		<version>2.1.0-SNAPSHOT</version>
+  		<version>3.0-SNAPSHOT</version>
   	</dependency>
   	<dependency>
   		<groupId>org.apache.velocity</groupId>
   		<artifactId>velocity-tools-view-jsp</artifactId>
-  		<version>2.1.0-SNAPSHOT</version>
+  		<version>3.0-SNAPSHOT</version>
   		<scope>runtime</scope>
   	</dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: velocity/tools/trunk/velocity-tools-generic/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-generic/pom.xml Wed Sep  2 12:57:21 2015
@@ -3,16 +3,16 @@
   <parent>
     <artifactId>velocity-tools-parent</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-generic</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>3.0-SNAPSHOT</version>
   <name>Apache Velocity Tools - Generic tools</name>
   <description>Generic tools that can be used in any context.</description>
   <dependencies>
   	<dependency>
-                <groupId>org.apache.velocity</groupId>
+      <groupId>org.apache.velocity</groupId>
   		<artifactId>velocity-engine-core</artifactId>
   		<version>2.0.0-SNAPSHOT</version>
   	</dependency>
@@ -26,11 +26,21 @@
   		<artifactId>commons-digester</artifactId>
   		<version>1.8.1</version>
   	</dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.7.12</version>
+    </dependency>
   	<dependency>
   		<groupId>junit</groupId>
   		<artifactId>junit</artifactId>
   		<version>4.8.1</version>
   		<scope>test</scope>
   	</dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <version>1.7.12</version>
+    </dependency>
   </dependencies>
 </project>

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolManager.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolManager.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolManager.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolManager.java Wed Sep  2 12:57:21 2015
@@ -20,8 +20,10 @@ package org.apache.velocity.tools;
  */
 
 import java.util.Map;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.ConfigurationUtils;
 import org.apache.velocity.tools.config.FactoryConfiguration;
@@ -163,7 +165,7 @@ public class ToolManager
         return this.userOverwrite;
     }
 
-    public Log getLog()
+    public Logger getLog()
     {
         if (velocity == null)
         {
@@ -174,7 +176,7 @@ public class ToolManager
 
     protected final void debug(String msg, Object... args)
     {
-        Log log = getLog();
+        Logger log = getLog();
         if (log != null && log.isDebugEnabled())
         {
             log.debug(String.format(msg, args));

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/FileFactoryConfiguration.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/FileFactoryConfiguration.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/FileFactoryConfiguration.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/FileFactoryConfiguration.java Wed Sep  2 12:57:21 2015
@@ -22,8 +22,10 @@ package org.apache.velocity.tools.config
 import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.tools.ConversionUtils;
 
 /**
@@ -74,7 +76,7 @@ public abstract class FileFactoryConfigu
         read(url, required, null);
     }
 
-    public void read(String path, boolean required, Log log)
+    public void read(String path, boolean required, Logger log)
     {
         if (path == null)
         {
@@ -109,7 +111,7 @@ public abstract class FileFactoryConfigu
         return ConversionUtils.toURL(path, this);
     }
 
-    protected void read(URL url, boolean required, Log log)
+    protected void read(URL url, boolean required, Logger log)
     {
         try
         {
@@ -133,7 +135,7 @@ public abstract class FileFactoryConfigu
 
 
     protected void read(Object source, InputStream inputStream,
-                        boolean required, Log log)
+                        boolean required, Logger log)
     {
         try
         {

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/LogSupport.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/LogSupport.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/LogSupport.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/LogSupport.java Wed Sep  2 12:57:21 2015
@@ -19,10 +19,10 @@ package org.apache.velocity.tools.config
  * under the License.
  */
 
-import org.apache.velocity.runtime.log.Log;
+import org.slf4j.Logger;
 
 /**
- * This allows for a {@link Log} to optionally be attached to
+ * This allows for a Logger to optionally be attached to
  * a subclass in order to output logging messages. This is simpler
  * than constantly checking whether we have a Log or not in each
  * usage throughout the classes which could use logging.  Methods should
@@ -36,7 +36,7 @@ import org.apache.velocity.runtime.log.L
 public abstract class LogSupport
 {
     private static final String DEFAULT_PREFIX = "";
-    private Log log;
+    private Logger log;
 
     /**
      * Override this to set a class-specific prefix
@@ -46,12 +46,12 @@ public abstract class LogSupport
         return DEFAULT_PREFIX;
     }
 
-    public void setLog(Log log)
+    public void setLog(Logger log)
     {
         this.log = log;
     }
 
-    protected Log getLog()
+    protected Logger getLog()
     {
         return this.log;
     }

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java Wed Sep  2 12:57:21 2015
@@ -31,7 +31,9 @@ import java.util.Collections;
 import java.util.List;
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.velocity.runtime.log.Log;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.tools.ClassUtils;
 import org.apache.velocity.tools.config.DefaultKey;
 
@@ -70,7 +72,7 @@ public class ClassTool extends SafeConfi
     public static final String INSPECT_KEY = "inspect";
     public static final String SHOW_DEPRECATED_KEY = "showDeprecated";
 
-    protected Log log;
+    protected Logger log;
     protected Class type;
     protected List<MethodSub> methods;
     protected List<ConstructorSub> constructors;
@@ -108,7 +110,7 @@ public class ClassTool extends SafeConfi
 
     protected void configure(ValueParser values)
     {
-        this.log = (Log)values.getValue("log");
+        this.log = (Logger)values.getValue("log");
         this.showDeprecated =
             values.getBoolean(SHOW_DEPRECATED_KEY, showDeprecated);
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java Wed Sep  2 12:57:21 2015
@@ -23,7 +23,9 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.velocity.runtime.log.Log;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.tools.ClassUtils;
 import org.apache.velocity.tools.config.DefaultKey;
 
@@ -90,14 +92,14 @@ public class FieldTool extends SafeConfi
      */
     public static final String STORE_DYNAMIC_KEY = "storeDynamicLookups";
 
-    protected Log log;
+    protected Logger log;
     protected HashMap storage = new HashMap();
     protected boolean storeDynamicLookups = true;
 
     protected void configure(ValueParser values)
     {
         // see if there's a log in there
-        this.log = (Log)values.getValue("log");
+        this.log = (Logger)values.getValue("log");
 
         // retrieve any classnames to be inspected and inspect them
         // *before* setting the storeDynamicLookups property!
@@ -255,11 +257,11 @@ public class FieldTool extends SafeConfi
 
     /**
      * Retrieves and returns the value of the specified {@link Field}
-     * in the specified {@link Class}.  If {@link Log} is provided, then
+     * in the specified {@link Class}.  If Logger is provided, then
      * access errors will be logged, otherwise this will fail silently
      * and return {@code null}.
      */
-    protected static Object retrieve(Field field, Class clazz, Log log)
+    protected static Object retrieve(Field field, Class clazz, Logger log)
     {
         try
         {
@@ -325,16 +327,16 @@ public class FieldTool extends SafeConfi
     /**
      * Holds a {@link Field} and {@link Class} reference for later
      * retrieval of the value of a field that is not final and may
-     * change at different lookups.  If a {@link Log} is passed in,
+     * change at different lookups.  If a Logger is passed in,
      * then this will log errors, otherwise it will fail silently.
      */
     public static class MutableField
     {
         private final Class clazz;
         private final Field field;
-        private final Log log;
+        private final Logger log;
 
-        public MutableField(Field f, Class c, Log l)
+        public MutableField(Field f, Class c, Logger l)
         {
             if (f == null || c == null)
             {

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java Wed Sep  2 12:57:21 2015
@@ -27,7 +27,9 @@ import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.velocity.runtime.log.Log;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.ToolContext;
 import org.apache.velocity.tools.config.DefaultKey;
@@ -104,7 +106,7 @@ public class LinkTool extends SafeConfig
     public static final String CHARSET_KEY = "charset";
     public static final String XHTML_MODE_KEY = "xhtml";
 
-    protected Log LOG;
+    protected Logger LOG;
     protected String scheme;
     protected String user;
     protected String host;
@@ -158,7 +160,7 @@ public class LinkTool extends SafeConfig
 
     protected void configure(ValueParser props)
     {
-        this.LOG = (Log)props.getValue(ToolContext.LOG_KEY);
+        this.LOG = (Logger)props.getValue(ToolContext.LOG_KEY);
 
         String link = props.getString(URI_KEY);
         if (link != null)

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java Wed Sep  2 12:57:21 2015
@@ -22,7 +22,7 @@ package org.apache.velocity.tools.generi
 import java.util.Map;
 import java.util.Locale;
 import java.util.Set;
-import java.util.HashMap;
+import java.util.TreeMap;
 import java.util.Collection;
 
 import org.apache.velocity.tools.config.DefaultKey;
@@ -68,7 +68,10 @@ public class ValueParser extends Convers
      */
     public static final String READONLY_KEY = "readOnly";
 
-    public ValueParser() {}
+    public ValueParser()
+    {
+        source = new TreeMap<String,Object>();
+    }
 
     public ValueParser(Map<String,Object> source)
     {
@@ -528,11 +531,6 @@ public class ValueParser extends Convers
             if (entry.getKey().startsWith(subkey) &&
                 entry.getKey().length() > subkey.length())
             {
-                if(values == null)
-                {
-                    values = new HashMap<String,Object>();
-                }
-
                 values.put(entry.getKey().substring(subkey.length()),entry.getValue());
             }
         }

Modified: velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/BaseTestCase.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/BaseTestCase.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/BaseTestCase.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/BaseTestCase.java Wed Sep  2 12:57:21 2015
@@ -40,7 +40,7 @@ public abstract class BaseTestCase exten
     protected VelocityEngine engine;
     protected VelocityContext context;
     protected boolean DEBUG = false;
-    protected MockLogChute log;
+    protected MockLogger log;
     protected String stringRepoName = "string.repo";
 
     public BaseTestCase(String name)
@@ -61,10 +61,9 @@ public abstract class BaseTestCase exten
         engine = new VelocityEngine();
 
         //by default, make the engine's log output go to the test-report
-        log = new MockLogChute(false, false);
-        log.setEnabledLevel(MockLogChute.INFO_ID);
-        log.setSystemErrLevel(MockLogChute.WARN_ID);
-        engine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, log);
+        log = new MockLogger(false, false);
+        log.setEnabledLevel(MockLogger.LOG_LEVEL_INFO);
+        engine.setProperty(RuntimeConstants.RUNTIME_LOG_INSTANCE, log);
 
         // use string resource loader by default, instead of file
         engine.setProperty(RuntimeConstants.RESOURCE_LOADER, "file,string");

Copied: velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java (from r1696835, velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogChute.java)
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java?p2=velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java&p1=velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogChute.java&r1=1696835&r2=1700798&rev=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogChute.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java Wed Sep  2 12:57:21 2015
@@ -1,124 +1,333 @@
-package org.apache.velocity.tools.generic;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import org.apache.velocity.runtime.RuntimeServices;
-import org.apache.velocity.runtime.log.SystemLogChute;
-
-/**
- * LogChute implementation that can easily capture output
- * or suppress it entirely.  By default, both capture and suppress
- * are on. To have this behave like a normal SystemLogChute,
- * you must turn it on() and stopCapture().
- *
- * @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
- * @author Nathan Bubna
- * @version $Id: TestLogChute.java 749684 2009-03-03 18:38:16Z nbubna $
- */
-public class MockLogChute extends SystemLogChute
-{
-    public static final String TEST_LOGGER_LEVEL = "runtime.log.logsystem.test.level";
-
-    private ByteArrayOutputStream log;
-    private PrintStream systemDotIn;
-    private boolean suppress = true;
-    private boolean capture = true;
-
-    public MockLogChute()
-    {
-        log = new ByteArrayOutputStream();
-        systemDotIn = new PrintStream(log, true);
-    }
-
-    public MockLogChute(boolean suppress, boolean capture)
-    {
-        this();
-        this.suppress = suppress;
-        this.capture = capture;
-    }
-    
-    public void init(RuntimeServices rs)
-    {
-        // this try-catch is here to allow compilation under velocity-engine-1.x & velocity-engine-2.x
-        try
-        {
-            super.init(rs);
-        }
-        catch(Exception e)
-        {
-            throw new RuntimeException(e);
-        }
-        String level = rs.getString(TEST_LOGGER_LEVEL);
-        if (level != null)
-        {
-            setEnabledLevel(toLevel(level));
-        }
-    }
-
-    public void on()
-    {
-        suppress = false;
-    }
-
-    public void off()
-    {
-        suppress = true;
-    }
-
-    public void startCapture()
-    {
-        capture = true;
-    }
-
-    public void stopCapture()
-    {
-        capture = false;
-    }
-
-    public boolean isLevelEnabled(int level)
-    {
-        return (!suppress || capture) && super.isLevelEnabled(level);
-    }
-            
-
-    protected void write(PrintStream ps, String prefix, String message, Throwable t)
-    {
-        if (capture)
-        {
-            super.write(systemDotIn, prefix, message, t);
-        }
-        else
-        {
-            super.write(ps, prefix, message, t);
-        }
-    }
-
-    /**
-     * Return the captured log messages to date.
-     * @return log messages
-     */
-    public String getLog()
-    {
-        return log.toString();
-    }
-
-}
+package org.apache.velocity.tools.generic;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import org.slf4j.Logger;
+import org.slf4j.helpers.FormattingTuple;
+import org.slf4j.helpers.MarkerIgnoringBase;
+import org.slf4j.helpers.MessageFormatter;
+import org.slf4j.spi.LocationAwareLogger;
+
+import org.apache.velocity.runtime.RuntimeServices;
+
+/**
+ * Logger implementation that can easily capture output
+ * or suppress it entirely.  By default, both capture and suppress
+ * are on. To have this behave like a normal SystemLogChute,
+ * you must turn it on() and stopCapture().
+ *
+ * @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
+ * @author Nathan Bubna
+ * @author <a href="mailto:cbrisson@apache.org">Claude Brisson</a>
+ * @version $Id: $
+ */
+public class MockLogger extends MarkerIgnoringBase
+{
+    private ByteArrayOutputStream log;
+    private PrintStream systemDotIn;
+
+    private boolean suppress = true;
+    private boolean capture = true;
+    private int enabledLevel = LOG_LEVEL_INFO;
+
+    public MockLogger()
+    {
+        this(true, true);
+    }
+
+    public MockLogger(boolean suppress, boolean capture)
+    {
+        this.suppress = suppress;
+        this.capture = capture;
+        if (suppress)
+        {
+            off();
+        }
+        else if (capture)
+        {
+            startCapture();
+        }
+    }
+    
+    public static final int LOG_LEVEL_TRACE = LocationAwareLogger.TRACE_INT;
+    public static final int LOG_LEVEL_DEBUG = LocationAwareLogger.DEBUG_INT;
+    public static final int LOG_LEVEL_INFO = LocationAwareLogger.INFO_INT;
+    public static final int LOG_LEVEL_WARN = LocationAwareLogger.WARN_INT;
+    public static final int LOG_LEVEL_ERROR = LocationAwareLogger.ERROR_INT;
+
+    private static int stringToLevel(String levelStr)
+    {
+        if ("trace".equalsIgnoreCase(levelStr)) return LOG_LEVEL_TRACE;
+        else if ("debug".equalsIgnoreCase(levelStr)) return LOG_LEVEL_DEBUG;
+        else if ("info".equalsIgnoreCase(levelStr)) return LOG_LEVEL_INFO;
+        else if ("warn".equalsIgnoreCase(levelStr)) return LOG_LEVEL_WARN;
+        else if ("error".equalsIgnoreCase(levelStr)) return LOG_LEVEL_ERROR;
+        // assume INFO by default
+        return LOG_LEVEL_INFO;
+    }
+
+    private static String getPrefix(int level)
+    {
+        if (level <= LOG_LEVEL_TRACE) return " [trace] ";
+        else if (level <= LOG_LEVEL_DEBUG) return " [debug] ";
+        else if (level <= LOG_LEVEL_INFO) return "  [info] ";
+        else if (level <= LOG_LEVEL_WARN) return "  [warn] ";
+        else return " [error]";
+    }
+
+    public synchronized void on()
+    {
+        if (suppress)
+        {
+            suppress = false;
+            if (capture)
+            {
+                startCapture();
+            }
+        }
+    }
+
+    public synchronized void off()
+    {
+        suppress = true;
+    }
+
+    public synchronized void startCapture()
+    {
+        capture = true;
+        if (!suppress)
+        {
+            log = new ByteArrayOutputStream();
+            systemDotIn = new PrintStream(log, true);
+        }
+    }
+
+    public synchronized void stopCapture()
+    {
+        capture = false;
+    }
+
+    public void setEnabledLevel(int level)
+    {
+        enabledLevel = level;
+    }
+
+    public boolean isLevelEnabled(int level)
+    {
+        return !suppress && level >= enabledLevel;
+    }
+            
+    /**
+     * Return the captured log messages to date.
+     * @return log messages
+     */
+    public String getLog()
+    {
+        return log.toString();
+    }
+
+  private synchronized void log(int level, String msg, Throwable t)
+  {
+      if(!suppress && level >= enabledLevel)
+      {
+          PrintStream writer = capture ? systemDotIn : System.err;
+          writer.print(getPrefix(enabledLevel));
+          writer.println(msg);
+          if (t != null)
+          {
+              writer.println(t.getMessage());
+              t.printStackTrace(writer);
+          }
+          writer.flush();
+      }
+  }
+
+  /**
+   * Logging API
+   */
+
+  public boolean isTraceEnabled()
+  {
+      return isLevelEnabled(LOG_LEVEL_TRACE);
+  }
+
+  public void trace(String msg)
+  {
+      log(LOG_LEVEL_TRACE, msg, null);
+  }
+
+  public void trace(String format, Object arg)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg);
+      log(LOG_LEVEL_TRACE, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void trace(String format, Object arg1, Object arg2)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
+      log(LOG_LEVEL_TRACE, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void trace(String format, Object[] argArray)
+  {
+      FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
+      log(LOG_LEVEL_TRACE, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void trace(String msg, Throwable t)
+  {
+      log(LOG_LEVEL_TRACE, msg, t);
+  }
+
+  public boolean isDebugEnabled()
+  {
+      return isLevelEnabled(LOG_LEVEL_DEBUG);
+  }
+
+  public void debug(String msg)
+  {
+      log(LOG_LEVEL_DEBUG, msg, null);
+  }
+
+  public void debug(String format, Object arg)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg);
+      log(LOG_LEVEL_DEBUG, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void debug(String format, Object arg1, Object arg2)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
+      log(LOG_LEVEL_DEBUG, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void debug(String format, Object[] argArray)
+  {
+      FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
+      log(LOG_LEVEL_DEBUG, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void debug(String msg, Throwable t)
+  {
+      log(LOG_LEVEL_DEBUG, msg, t);
+  }
+
+  public boolean isInfoEnabled()
+  {
+      return isLevelEnabled(LOG_LEVEL_INFO);
+  }
+
+  public void info(String msg)
+  {
+      log(LOG_LEVEL_INFO, msg, null);
+  }
+
+  public void info(String format, Object arg)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg);
+      log(LOG_LEVEL_INFO, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void info(String format, Object arg1, Object arg2)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
+      log(LOG_LEVEL_INFO, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void info(String format, Object[] argArray)
+  {
+      FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
+      log(LOG_LEVEL_INFO, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void info(String msg, Throwable t)
+  {
+      log(LOG_LEVEL_INFO, msg, t);
+  }
+
+  public boolean isWarnEnabled()
+  {
+      return isLevelEnabled(LOG_LEVEL_WARN);
+  }
+
+  public void warn(String msg)
+  {
+      log(LOG_LEVEL_WARN, msg, null);
+  }
+
+  public void warn(String format, Object arg)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg);
+      log(LOG_LEVEL_WARN, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void warn(String format, Object arg1, Object arg2)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
+      log(LOG_LEVEL_WARN, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void warn(String format, Object[] argArray)
+  {
+      FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
+      log(LOG_LEVEL_WARN, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void warn(String msg, Throwable t)
+  {
+      log(LOG_LEVEL_WARN, msg, t);
+  }
+
+  public boolean isErrorEnabled()
+  {
+      return isLevelEnabled(LOG_LEVEL_ERROR);
+  }
+
+  public void error(String msg)
+  {
+      log(LOG_LEVEL_ERROR, msg, null);
+  }
+
+  public void error(String format, Object arg)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg);
+      log(LOG_LEVEL_ERROR, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void error(String format, Object arg1, Object arg2)
+  {
+      FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
+      log(LOG_LEVEL_ERROR, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void error(String format, Object[] argArray)
+  {
+      FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
+      log(LOG_LEVEL_ERROR, ft.getMessage(), ft.getThrowable());
+  }
+
+  public void error(String msg, Throwable t)
+  {
+      log(LOG_LEVEL_ERROR, msg, t);
+  }
+}

Modified: velocity/tools/trunk/velocity-tools-struts/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-struts/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-struts/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-struts/pom.xml Wed Sep  2 12:57:21 2015
@@ -3,11 +3,11 @@
   <parent>
     <artifactId>velocity-tools-parent</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-struts</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>3.0-SNAPSHOT</version>
   <name>Apache Velocity Tools - Struts tools</name>
   <description>Tools for development under Apache Struts 1.x</description>
   <dependencies>
@@ -19,7 +19,7 @@
   	<dependency>
   		<groupId>org.apache.velocity</groupId>
   		<artifactId>velocity-tools-view</artifactId>
-  		<version>2.1.0-SNAPSHOT</version>
+  		<version>3.0-SNAPSHOT</version>
   	</dependency>
   	<dependency>
   		<groupId>javax.servlet</groupId>
@@ -49,4 +49,4 @@
   		<version>1.3.8</version>
   	</dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/MessageResourcesTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/MessageResourcesTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/MessageResourcesTool.java (original)
+++ velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/MessageResourcesTool.java Wed Sep  2 12:57:21 2015
@@ -23,8 +23,10 @@ import java.util.Locale;
 import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.ServletContext;
+
+import org.slf4j.Logger;
+
 import org.apache.struts.util.MessageResources;
-import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.tools.view.ViewContext;
 
 /**
@@ -36,7 +38,7 @@ import org.apache.velocity.tools.view.Vi
  */
 public abstract class MessageResourcesTool
 {
-    protected Log LOG;
+    protected Logger LOG;
     protected ServletContext application;
     protected HttpServletRequest request;
     private Locale locale;
@@ -64,7 +66,7 @@ public abstract class MessageResourcesTo
     {
         this.request = (HttpServletRequest)params.get(ViewContext.REQUEST);
         this.application = (ServletContext)params.get(ViewContext.SERVLET_CONTEXT_KEY);
-        this.LOG = (Log)params.get("log");
+        this.LOG = (Logger)params.get("log");
     }
 
 

Modified: velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/StrutsLinkTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/StrutsLinkTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/StrutsLinkTool.java (original)
+++ velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/StrutsLinkTool.java Wed Sep  2 12:57:21 2015
@@ -21,7 +21,7 @@ package org.apache.velocity.tools.struts
 
 import javax.servlet.ServletContext;
 import org.apache.velocity.tools.generic.ValueParser;
-import org.apache.velocity.tools.view.tools.LinkTool;
+import org.apache.velocity.tools.view.LinkTool;
 import org.apache.velocity.tools.view.ViewContext;
 
 /**

Modified: velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/TilesTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/TilesTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/TilesTool.java (original)
+++ velocity/tools/trunk/velocity-tools-struts/src/main/java/org/apache/velocity/tools/struts/TilesTool.java Wed Sep  2 12:57:21 2015
@@ -101,6 +101,7 @@ public class TilesTool extends ImportSup
             setRequest(ctx.getRequest());
             setResponse(ctx.getResponse());
             setServletContext(ctx.getServletContext());
+            setLog(ctx.getVelocityEngine().getLog());
         }
     }
 

Modified: velocity/tools/trunk/velocity-tools-uberjar/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-uberjar/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-uberjar/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-uberjar/pom.xml Wed Sep  2 12:57:21 2015
@@ -4,11 +4,11 @@
     <parent>
         <artifactId>velocity-tools-parent</artifactId>
         <groupId>org.apache.velocity</groupId>
-        <version>2.1.0-SNAPSHOT</version>
+        <version>3.0-SNAPSHOT</version>
     </parent>
     <groupId>org.apache.velocity</groupId>
     <artifactId>velocity-tools-uberjar</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
     <name>Apache Velocity Tools - Uberjar</name>
     <description>Aggregation of all Velocity Tools JARs</description>
     <build>
@@ -43,17 +43,17 @@
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-view-jsp</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-struts</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity-tools-xml</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
+            <version>3.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: velocity/tools/trunk/velocity-tools-view-jsp/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view-jsp/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view-jsp/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-view-jsp/pom.xml Wed Sep  2 12:57:21 2015
@@ -3,18 +3,18 @@
   <parent>
     <artifactId>velocity-tools-parent</artifactId>
     <groupId>org.apache.velocity</groupId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.velocity</groupId>
   <artifactId>velocity-tools-view-jsp</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>3.0-SNAPSHOT</version>
   <name>Apache Velocity Tools - JSP support</name>
   <description>Enables the use of Velocity under a JSP environment.</description>
   <dependencies>
   	<dependency>
   	    <groupId>org.apache.velocity</groupId>
   		<artifactId>velocity-tools-view</artifactId>
-  		<version>2.1.0-SNAPSHOT</version>
+  		<version>3.0-SNAPSHOT</version>
   	</dependency>
   	<dependency>
   		<groupId>javax.servlet</groupId>
@@ -41,4 +41,4 @@
   		<scope>test</scope>
   	</dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: velocity/tools/trunk/velocity-tools-view/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/pom.xml?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-view/pom.xml Wed Sep  2 12:57:21 2015
@@ -4,11 +4,11 @@
 	<parent>
 		<artifactId>velocity-tools-parent</artifactId>
 		<groupId>org.apache.velocity</groupId>
-		<version>2.1.0-SNAPSHOT</version>
+		<version>3.0-SNAPSHOT</version>
 	</parent>
 	<groupId>org.apache.velocity</groupId>
 	<artifactId>velocity-tools-view</artifactId>
-	<version>2.1.0-SNAPSHOT</version>
+	<version>3.0-SNAPSHOT</version>
 	<name>Apache Velocity Tools - View tools</name>
 	<description>Tools to be used in a servlet context.</description>
 	<build>
@@ -31,7 +31,7 @@
 		<dependency>
 			<groupId>org.apache.velocity</groupId>
 			<artifactId>velocity-tools-generic</artifactId>
-			<version>2.1.0-SNAPSHOT</version>
+			<version>3.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>javax.servlet</groupId>

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java Wed Sep  2 12:57:21 2015
@@ -22,8 +22,9 @@ package org.apache.velocity.tools.view;
 import java.util.Collections;
 import java.util.List;
 import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.InvalidScope;
@@ -130,11 +131,19 @@ public abstract class AbstractSearchTool
     protected static final String STORED_RESULTS_KEY =
         StoredResults.class.getName();
 
-    protected static final Log LOG = LogFactory.getLog(AbstractSearchTool.class);
-
+    protected Logger LOG;
     private String criteriaKey = DEFAULT_CRITERIA_KEY;
     private Object criteria;
 
+    public void setLog(Logger log)
+    {
+        if (log == null)
+        {
+            throw new NullPointerException("log should not be set to null");
+        }
+        this.LOG = log;
+    }
+
     /**
      * Sets the criteria *if* it is set in the request parameters.
      */

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java Wed Sep  2 12:57:21 2015
@@ -24,8 +24,9 @@ import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 import java.util.*;
 import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.ConversionUtils;
 import org.apache.velocity.tools.generic.FormatConfig;
@@ -74,8 +75,8 @@ import org.apache.velocity.tools.config.
 public class BrowserTool extends FormatConfig implements java.io.Serializable
 {
     private static final long serialVersionUID = 1734529350532353339L;
- 
-    protected static final Log LOG = LogFactory.getLog(BrowserTool.class);
+
+    protected Logger LOG;
 
     /* User-Agent header variables */
     private String userAgent = null;
@@ -188,6 +189,19 @@ public class BrowserTool extends FormatC
     }
 
     /**
+     * Set log.
+     */
+    public void setLog(Logger log)
+    {
+        if (log == null)
+        {
+            throw new NullPointerException("log should not be set to null");
+        }
+        this.LOG = log;
+    }
+
+
+    /**
      * Sets the User-Agent string to be parsed for info.  If null, the string
      * will be empty and everything will return false or null.  Otherwise,
      * it will set the whole string to lower case before storing to simplify

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/CookieTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/CookieTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/CookieTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/CookieTool.java Wed Sep  2 12:57:21 2015
@@ -24,7 +24,9 @@ import java.util.List;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.velocity.runtime.log.Log;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.ValidScope;
 import org.apache.velocity.tools.ConversionUtils;
@@ -58,7 +60,7 @@ public class CookieTool
 {
     protected HttpServletRequest request;
     protected HttpServletResponse response;
-    protected Log log;
+    protected Logger log;
     private List<Cookie> jar;
 
     // --------------------------------------- Setup Methods -------------
@@ -95,7 +97,7 @@ public class CookieTool
      * Sets the {@link Log} used for logging messages when Cookie
      * creation fails due to an invalid name.
      */
-    public void setLog(Log log)
+    public void setLog(Logger log)
     {
         this.log = log;
     }

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportSupport.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportSupport.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportSupport.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportSupport.java Wed Sep  2 12:57:21 2015
@@ -39,17 +39,13 @@ import javax.servlet.ServletOutputStream
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponseWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
+import org.slf4j.Logger;
 
 /**
  * <p>Provides methods to import arbitrary local or remote resources as strings.</p>
  * <p>Based on ImportSupport from the JSTL taglib by Shawn Bayern</p>
  *
- * <p>If you wish to take profit of your J2EE container session serialization,
- *    inheriting tools should always be in the request scope.</p>
- *
  * @author <a href="mailto:marinoj@centrum.is">Marino A. Jonsson</a>
  * @since VelocityTools 2.0
  * @version $Revision$ $Date$
@@ -62,8 +58,7 @@ public abstract class ImportSupport
     /** Default character encoding for response. */
     protected static final String DEFAULT_ENCODING = "ISO-8859-1";
 
-    protected static final Log LOG = LogFactory.getLog(ImportSupport.class);
-
+    protected Logger LOG;
     protected ServletContext application;
     protected HttpServletRequest request;
     protected HttpServletResponse response;
@@ -71,6 +66,15 @@ public abstract class ImportSupport
 
     // --------------------------------------- Setup Methods -------------
 
+    public void setLog(Logger log)
+    {
+        if (log == null)
+        {
+            throw new NullPointerException("log should not be set to null");
+        }
+        this.LOG = log;
+    }
+
     /**
      * Sets the current {@link HttpServletRequest}. This is required
      * for this tool to operate and will throw a NullPointerException

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UiDependencyTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UiDependencyTool.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UiDependencyTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UiDependencyTool.java Wed Sep  2 12:57:21 2015
@@ -29,13 +29,15 @@ import java.util.List;
 import java.util.Map;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.Logger;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
+
 import org.apache.commons.digester.Digester;
 import org.apache.commons.digester.Rule;
 import org.apache.velocity.tools.ClassUtils;
 import org.apache.velocity.tools.view.ViewContext;
-import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.ToolContext;
 import org.apache.velocity.tools.config.DefaultKey;
@@ -131,7 +133,7 @@ public class UiDependencyTool {
     private Map<String,Group> groups = null;
     private List<Type> types = DEFAULT_TYPES;
     private Map<String,List<String>> dependencies;
-    private Log LOG;
+    private Logger LOG;
     private String context = "";
 
     private void debug(String msg, Object... args) {
@@ -140,7 +142,7 @@ public class UiDependencyTool {
         }
     }
 
-    protected static final void trace(Log log, String msg, Object... args) {
+    protected static final void trace(Logger log, String msg, Object... args) {
         if (log.isTraceEnabled()) {
             log.trace(String.format("UiDependencyTool: "+msg, args));
         }
@@ -148,7 +150,7 @@ public class UiDependencyTool {
 
     public void configure(Map params) {
         ServletContext app = (ServletContext)params.get(ViewContext.SERVLET_CONTEXT_KEY);
-        LOG = (Log)params.get(ToolContext.LOG_KEY);
+        LOG = (Logger)params.get(ToolContext.LOG_KEY);
 
         HttpServletRequest request = (HttpServletRequest)params.get(ViewContext.REQUEST);
         context = request.getContextPath();
@@ -541,9 +543,9 @@ public class UiDependencyTool {
         private Map<String,Integer> typeCounts = new LinkedHashMap<String,Integer>();
         private Map<String,List<String>> dependencies = new LinkedHashMap<String,List<String>>();
         private List<String> groups;
-        private Log LOG;
+        private Logger LOG;
 
-        public Group(String name, Log log) {
+        public Group(String name, Logger log) {
             this.name = name;
             this.LOG = log;
         }

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java Wed Sep  2 12:57:21 2015
@@ -30,15 +30,16 @@ import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.Template;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.exception.ResourceNotFoundException;
 import org.apache.velocity.io.VelocityWriter;
 import org.apache.velocity.runtime.RuntimeConstants;
-import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.shaded.commons.collections.ExtendedProperties;
-import org.apache.velocity.tools.generic.log.LogChuteCommonsLog;
 import org.apache.velocity.tools.ClassUtils;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.Toolbox;
@@ -330,10 +331,6 @@ public class VelocityView extends ViewTo
      */
     protected void init(JeeConfig config, final VelocityEngine velocity)
     {
-        // register this engine to be the default handler of log messages
-        // if the user points commons-logging to the LogSystemCommonsLog
-        LogChuteCommonsLog.setVelocityLog(getLog());
-
         // put the servlet context into Velocity's application attributes,
         // where the WebappResourceLoader can find them
         velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, this.servletContext);

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java Wed Sep  2 12:57:21 2015
@@ -29,11 +29,13 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.Template;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.exception.MethodInvocationException;
 import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.shaded.commons.lang3.StringEscapeUtils;
 
 /**
@@ -168,7 +170,7 @@ public class VelocityViewServlet extends
         return getVelocityView().getProperty(name, alternate);
     }
 
-    protected Log getLog()
+    protected Logger getLog()
     {
         return getVelocityView().getLog();
     }

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java?rev=1700798&r1=1700797&r2=1700798&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java Wed Sep  2 12:57:21 2015
@@ -19,6 +19,13 @@ package org.apache.velocity.tools.view;
  * under the License.
  */
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.ServletContext;
+import java.lang.reflect.InvocationTargetException;
+
+import org.slf4j.Logger;
+
 import org.apache.velocity.util.introspection.AbstractChainableUberspector;
 import org.apache.velocity.util.introspection.Info;
 import org.apache.velocity.util.introspection.Introspector;
@@ -27,12 +34,6 @@ import org.apache.velocity.util.introspe
 import org.apache.velocity.util.introspection.VelPropertySet;
 import org.apache.velocity.runtime.parser.node.AbstractExecutor;
 import org.apache.velocity.runtime.parser.node.SetExecutor;
-import org.apache.velocity.runtime.log.Log;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import javax.servlet.ServletContext;
-import java.lang.reflect.InvocationTargetException;
 
 /**
  * <p>This custom uberspector allows getAttribute() and setAttribute() as standard
@@ -138,7 +139,7 @@ public class WebappUberspector extends A
          * @param clazz
          * @param property
          */
-        public GetAttributeExecutor(final Log log, final Introspector introspector,
+        public GetAttributeExecutor(final Logger log, final Introspector introspector,
                 final Class clazz, final String property)
         {
             this.log = log;
@@ -192,7 +193,7 @@ public class WebappUberspector extends A
          * @param arg
          * @param property
          */
-        public SetAttributeExecutor(final Log log, final Introspector introspector,
+        public SetAttributeExecutor(final Logger log, final Introspector introspector,
                 final Class clazz, final Object arg, final String property)
         {
             this.log = log;



Mime
View raw message