velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From by...@apache.org
Subject svn commit: r730039 - in /velocity/engine/trunk/src: java/org/apache/velocity/runtime/ java/org/apache/velocity/runtime/log/ test/org/apache/velocity/test/misc/
Date Tue, 30 Dec 2008 03:53:20 GMT
Author: byron
Date: Mon Dec 29 19:53:19 2008
New Revision: 730039

URL: http://svn.apache.org/viewvc?rev=730039&view=rev
Log:
VELOCITY-659 Reverse changes in the LogChute API so that we don't break dependant packages

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java
    velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java Mon Dec
29 19:53:19 2008
@@ -60,11 +60,11 @@
 import org.apache.velocity.util.ClassUtils;
 import org.apache.velocity.util.RuntimeServicesAware;
 import org.apache.velocity.util.StringUtils;
+import org.apache.velocity.util.introspection.ChainableUberspector;
 import org.apache.velocity.util.introspection.Introspector;
+import org.apache.velocity.util.introspection.LinkingUberspector;
 import org.apache.velocity.util.introspection.Uberspect;
 import org.apache.velocity.util.introspection.UberspectLoggable;
-import org.apache.velocity.util.introspection.ChainableUberspector;
-import org.apache.velocity.util.introspection.LinkingUberspector;
 
 /**
  * This is the Runtime system for Velocity. It is the
@@ -816,7 +816,14 @@
     {
         // since the Log we started with was just placeholding,
         // let's update it with the real LogChute settings.
-        LogManager.updateLog(this.log, this);
+        try
+        {
+            LogManager.updateLog(this.log, this);
+        } 
+        catch (Exception e)
+        {
+            throw new VelocityException("Error initializing log: " + e.getMessage(), e);
+        }
     }
 
 

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java Mon
Dec 29 19:53:19 2008
@@ -30,7 +30,6 @@
 import org.apache.log.Logger;
 import org.apache.log.Priority;
 import org.apache.log.output.io.FileTarget;
-import org.apache.velocity.exception.VelocityException;
 import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.runtime.RuntimeServices;
 
@@ -68,7 +67,7 @@
     /**
      * @see org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
      */
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
         this.rsvc = rs;
 
@@ -93,7 +92,7 @@
     }
 
     // creates a file target using the specified file name
-    private void initTarget(final String file, final RuntimeServices rsvc)
+    private void initTarget(final String file, final RuntimeServices rsvc) throws Exception
     {
         try
         {
@@ -117,7 +116,7 @@
         catch (IOException ioe)
         {
             rsvc.getLog().error("Unable to create log file for AvalonLogChute", ioe);
-            throw new VelocityException("Error configuring AvalonLogChute : " + ioe, ioe);
+            throw new Exception("Error configuring AvalonLogChute : " + ioe);
         }
     }
 

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
(original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
Mon Dec 29 19:53:19 2008
@@ -63,7 +63,7 @@
 
     /********** LogChute methods *************/
 
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
         String name = 
             (String)rs.getProperty(LOGCHUTE_COMMONS_LOG_NAME);

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java Mon
Dec 29 19:53:19 2008
@@ -42,7 +42,7 @@
     /**
      * @see org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
      */
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
     }
 

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java Mon
Dec 29 19:53:19 2008
@@ -59,7 +59,7 @@
     /**
      * @see org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
      */
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
         rsvc = rs;
 
@@ -109,7 +109,7 @@
     }
 
     // This tries to create a file appender for the specified file name.
-    private void initAppender(String file)
+    private void initAppender(String file) throws Exception
     {
         try
         {

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java Mon Dec 29
19:53:19 2008
@@ -68,7 +68,7 @@
      * @param rs
      * @throws Exception
      */
-    void init(RuntimeServices rs);
+    void init(RuntimeServices rs) throws Exception;
 
     /**
      * Send a log message from Velocity.

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java Mon
Dec 29 19:53:19 2008
@@ -48,7 +48,7 @@
     /**
      * @see org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
      */
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
         logSystem.init(rs);
     }

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java Mon Dec
29 19:53:19 2008
@@ -63,7 +63,7 @@
 {
     // Creates a new logging system or returns an existing one
     // specified by the application.
-    private static LogChute createLogChute(RuntimeServices rsvc)
+    private static LogChute createLogChute(RuntimeServices rsvc) throws Exception
     {
         Log log = rsvc.getLog();
 
@@ -246,9 +246,10 @@
      * settings determined by the RuntimeServices.
      * @param log
      * @param rsvc
+     * @throws Exception
      * @since 1.5
      */
-    public static void updateLog(Log log, RuntimeServices rsvc)
+    public static void updateLog(Log log, RuntimeServices rsvc) throws Exception
     {
         // create a new LogChute using the RuntimeServices
         LogChute newLogChute = createLogChute(rsvc);

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java Mon Dec
29 19:53:19 2008
@@ -61,7 +61,7 @@
      * @param rs
      * @throws Exception
      */
-    public void init( RuntimeServices rs );
+    public void init( RuntimeServices rs ) throws Exception;
 
     /**
      * @param level

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java Mon Dec
29 19:53:19 2008
@@ -35,7 +35,7 @@
     /**
      * @see org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
      */
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
     }
 

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java Mon
Dec 29 19:53:19 2008
@@ -65,7 +65,7 @@
      * @throws IllegalStateException if the ServletContext is not available
      *         in the application attributes under the appropriate key.
      */
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
         Object obj = rs.getApplicationAttribute(ServletContext.class.getName());
         if (obj == null)

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java Mon
Dec 29 19:53:19 2008
@@ -40,7 +40,7 @@
     private int enabled = WARN_ID;
     private int errLevel = TRACE_ID;
 
-    public void init(RuntimeServices rs)
+    public void init(RuntimeServices rs) throws Exception
     {
         // look for a level config property
         String level = (String)rs.getProperty(RUNTIME_LOG_LEVEL_KEY);

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java?rev=730039&r1=730038&r2=730039&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java Mon Dec
29 19:53:19 2008
@@ -57,6 +57,7 @@
     }
     
     public void init(RuntimeServices rs)
+        throws Exception
     {
         super.init(rs);
 



Mime
View raw message