Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 41265 invoked by uid 500); 13 Aug 2001 06:00:31 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 41256 invoked by uid 500); 13 Aug 2001 06:00:31 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 13 Aug 2001 05:57:33 -0000 Message-ID: <20010813055733.32510.qmail@icarus.apache.org> From: cziegeler@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/org/apache/cocoon/util/log CocoonLogFormatter.java XMLCocoonLogFormatter.java X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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 @@ * * * @author Sylvain Wallez - * @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 Peter Donald * @author Sylvain Wallez * @author Carsten Ziegeler - * @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