aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Grozev <boris@jitsi.org>2015-02-18 17:00:26 +0100
committerBoris Grozev <boris@jitsi.org>2015-02-18 17:00:26 +0100
commita2266ce2f5a5461c796f2d762a8a59159f8da393 (patch)
tree69e00745eb0f6b6a764a20b2b30282bb18f14573 /src
parent88850101441b0bf2df83b5786bfc92694503a300 (diff)
downloadjitsi-a2266ce2f5a5461c796f2d762a8a59159f8da393.zip
jitsi-a2266ce2f5a5461c796f2d762a8a59159f8da393.tar.gz
jitsi-a2266ce2f5a5461c796f2d762a8a59159f8da393.tar.bz2
Adds the current date to every log message.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/util/ScLogFormatter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/util/ScLogFormatter.java b/src/net/java/sip/communicator/util/ScLogFormatter.java
index 900eed5..1621e6b 100644
--- a/src/net/java/sip/communicator/util/ScLogFormatter.java
+++ b/src/net/java/sip/communicator/util/ScLogFormatter.java
@@ -22,8 +22,6 @@ import java.util.logging.*;
public class ScLogFormatter
extends java.util.logging.Formatter
{
- static long startTime = System.currentTimeMillis();
-
private static String lineSeparator = System.getProperty("line.separator");
private static DecimalFormat twoDigFmt = new DecimalFormat("00");
private static DecimalFormat threeDigFmt = new DecimalFormat("000");
@@ -40,11 +38,17 @@ public class ScLogFormatter
//current time
Calendar cal = Calendar.getInstance();
+ int year = cal.get(Calendar.YEAR);
+ int month = cal.get(Calendar.MONTH);
+ int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minutes = cal.get(Calendar.MINUTE);
int seconds = cal.get(Calendar.SECOND);
int millis = cal.get(Calendar.MILLISECOND);
+ sb.append(year).append('-');
+ sb.append(twoDigFmt.format(month)).append('-');
+ sb.append(twoDigFmt.format(day)).append(' ');
sb.append(twoDigFmt.format(hour)).append(':');
sb.append(twoDigFmt.format(minutes)).append(':');
sb.append(twoDigFmt.format(seconds)).append('.');