jvanzyl     00/10/17 10:10:49

  Modified:    src/java/org/apache/velocity/runtime Runtime.java
  Log:
  - fixed the velocity.log MalformedURLException problem by looking
    at the entry and prepending file:// to form a proper URL. Problem
    reported by Kasper Nielsen <[EMAIL PROTECTED]>. Thanks.
  
  Revision  Changes    Path
  1.17      +8 -0      
jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
  
  Index: Runtime.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Runtime.java      2000/10/15 21:16:30     1.16
  +++ Runtime.java      2000/10/17 17:10:47     1.17
  @@ -254,6 +254,14 @@
       {
           if (!getString(RUNTIME_LOG).equals("system"))
           {
  +            // Let's look at the log file entry and
  +            // correct it if it is not a property 
  +            // fomratted URL.
  +            String logFile = getString(RUNTIME_LOG);
  +            
  +            if (! logFile.startsWith("file"))
  +                logFile = "file://" + logFile;
  +            
               // Initialize the logger.
               logger = LogKit.createLogger("velocity", 
                   getString(RUNTIME_LOG), "DEBUG");
  
  
  

Reply via email to