jvanzyl     00/10/19 15:03:30

  Modified:    src/java/org/apache/velocity/runtime Runtime.java
  Log:
  - updated for the new log file formater.
  
  Revision  Changes    Path
  1.19      +12 -3     
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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Runtime.java      2000/10/19 19:32:43     1.18
  +++ Runtime.java      2000/10/19 22:03:25     1.19
  @@ -65,8 +65,11 @@
   import org.apache.log.LogKit;
   import org.apache.log.Logger;
   import org.apache.log.LogTarget;
  +import org.apache.log.Formater;
   import org.apache.log.output.FileOutputLogTarget;
   
  +import org.apache.velocity.runtime.log.VelocityFormater;
  +
   import org.apache.velocity.Template;
   
   import org.apache.velocity.runtime.parser.Parser;
  @@ -135,7 +138,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jeff</a>
  - * @version $Id: Runtime.java,v 1.18 2000/10/19 19:32:43 jvanzyl Exp $
  + * @version $Id: Runtime.java,v 1.19 2000/10/19 22:03:25 jvanzyl Exp $
    */
   public class Runtime
   {
  @@ -294,9 +297,15 @@
                   getString(RUNTIME_LOG), "DEBUG");
                   
               LogTarget[] t = logger.getLogTargets();            
  +
               ((FileOutputLogTarget)t[0])
  -                .setFormat("%5.5{time} %{message}\\n%{throwable}" );
  -        
  +                .setFormater((Formater) new VelocityFormater());
  +
  +            ((FileOutputLogTarget)t[0])
  +                .setFormat("%{time} %{message}\\n%{throwable}" );
  +
  +            //.setFormat("%5.5{time} %{message}\\n%{throwable}" );
  +
               if (pendingMessages.length() > 0)
               {
                   logger.info(pendingMessages.toString());
  
  
  

Reply via email to