Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No commit message

  • Loading branch information...
commit fdf2d172e2fe46904a471c30700331032105a096 1 parent 7c3cd1d
edwardhieatt authored
View
19 java/source_core/net/jsunit/LogFormatter.java
@@ -0,0 +1,19 @@
+package net.jsunit;
+
+import java.util.logging.Formatter;
+import java.util.logging.LogRecord;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+
+public class LogFormatter extends Formatter {
+ public String format(LogRecord record) {
+ Date date = new Date(record.getMillis());
+ String dateString = SimpleDateFormat.getDateTimeInstance().format(date);
+ StringBuffer result = new StringBuffer();
+ result.append(dateString);
+ result.append(": ");
+ result.append(record.getMessage());
+ result.append("\r\n");
+ return result.toString();
+ }
+}
View
4 logging.properties
@@ -3,6 +3,6 @@
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
-java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
+java.util.logging.ConsoleHandler.formatter=net.jsunit.LogFormatter
-net.jsunit.level=WARNING
+net.jsunit.level=ALL
Please sign in to comment.
Something went wrong with that request. Please try again.