cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/util/log CocoonLogFormatter.java XMLCocoonLogFormatter.java
Date Mon, 13 Aug 2001 05:57:33 GMT
cziegeler    01/08/12 22:57:33

  Modified:    src/org/apache/cocoon/util/log CocoonLogFormatter.java
                        XMLCocoonLogFormatter.java
  Log:
  Applied a very small patch to change the recently added date in the logs to a
  compacter format.
  Submitted by: Stuart Roebuck (stuart.roebuck@adolos.com)
  
  Revision  Changes    Path
  1.4       +4 -2      xml-cocoon2/src/org/apache/cocoon/util/log/CocoonLogFormatter.java
  
  Index: CocoonLogFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/util/log/CocoonLogFormatter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CocoonLogFormatter.java	2001/08/07 15:07:02	1.3
  +++ CocoonLogFormatter.java	2001/08/13 05:57:32	1.4
  @@ -8,6 +8,7 @@
   
   package org.apache.cocoon.util.log;
   
  +import java.text.SimpleDateFormat;
   import java.util.Date;
   import java.util.Map;
   
  @@ -33,7 +34,7 @@
    * </ul>
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2001/08/07 15:07:02 $
  + * @version CVS $Revision: 1.4 $ $Date: 2001/08/13 05:57:32 $
    */
   
   public class CocoonLogFormatter extends ExtensiblePatternFormatter
  @@ -48,6 +49,7 @@
       protected final static String  TYPE_URI_STR         = "uri";
       protected final static String  TYPE_THREAD_STR      = "thread";
       
  +    protected final SimpleDateFormat dateFormatter = new SimpleDateFormat("(yyyy-MM-dd)
HH:mm.ss:SSS");
       
       /** 
        * Hack to get the call stack as an array of classes. The
  @@ -207,7 +209,7 @@
        */
       protected String getTime( final long time, final String format )
       {
  -        return new Date().toString();
  +        return this.dateFormatter.format(new Date());
       }
   
   }
  
  
  
  1.4       +2 -2      xml-cocoon2/src/org/apache/cocoon/util/log/XMLCocoonLogFormatter.java
  
  Index: XMLCocoonLogFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/util/log/XMLCocoonLogFormatter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLCocoonLogFormatter.java	2001/08/09 12:38:59	1.3
  +++ XMLCocoonLogFormatter.java	2001/08/13 05:57:32	1.4
  @@ -49,7 +49,7 @@
    * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2001/08/09 12:38:59 $
  + * @version CVS $Revision: 1.4 $ $Date: 2001/08/13 05:57:32 $
    */
   public class XMLCocoonLogFormatter
   implements Formatter {
  @@ -82,7 +82,7 @@
            "thread"};  // 10
   
       protected final static String EOL = System.getProperty("line.separator", "\n");
  -    protected final SimpleDateFormat dateFormatter = new SimpleDateFormat();
  +    protected final SimpleDateFormat dateFormatter = new SimpleDateFormat("(yyyy-MM-dd)
HH:mm.ss:SSS");
   
       protected int[] types;
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message