package com.vaadin.terminal.gwt.client;
import java.util.Collection;
+import java.util.Date;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
import com.google.gwt.http.client.UrlBuilder;
+import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
if (msg == null) {
msg = "null";
}
+ msg = addTimestamp(msg);
// remoteLog(msg);
logToDebugWindow(msg, false);
if (msg == null) {
msg = "null";
}
-
+ msg = addTimestamp(msg);
logToDebugWindow(msg, true);
GWT.log(msg);
}
+ DateTimeFormat timestampFormat = DateTimeFormat.getFormat("HH:mm:ss:SSS");
+
+ @SuppressWarnings("deprecation")
+ private String addTimestamp(String msg) {
+ Date date = new Date();
+ String timestamp = timestampFormat.format(date);
+ return timestamp + " " + msg;
+ }
+
/*
* (non-Javadoc)
*