felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1394664 - /felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
Date Fri, 05 Oct 2012 17:19:18 GMT
Author: djencks
Date: Fri Oct  5 17:19:18 2012
New Revision: 1394664

URL: http://svn.apache.org/viewvc?rev=1394664&view=rev
Log:
include milliseconds in test logging

Modified:
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java?rev=1394664&r1=1394663&r2=1394664&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
Fri Oct  5 17:19:18 2012
@@ -38,6 +38,7 @@ import java.io.PrintStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.lang.reflect.Field;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -596,6 +597,7 @@ public abstract class ComponentTestBase
 
     public static class Log implements LogListener
     {
+        private final SimpleDateFormat _sdf = new SimpleDateFormat("HH:mm:ss,S");
         private final List m_warnings = Collections.synchronizedList( new ArrayList() );//<LogEntry>
         private final static PrintStream _out =
                 new PrintStream(new BufferedOutputStream(new FileOutputStream( FileDescriptor.err),
128));
@@ -609,7 +611,7 @@ public abstract class ComponentTestBase
             StringWriter sw = new StringWriter();
             sw.append( "log level: " + entry.getLevel() );
             sw.append(" D=");
-            sw.append(new Date(entry.getTime()).toString());
+            sw.append(_sdf.format( new Date(entry.getTime())));
             sw.append(", T=" + Thread.currentThread().getName());
             sw.append(": ");
             sw.append(entry.getMessage());



Mime
View raw message