more timestamps

This commit is contained in:
rusEfi 2018-01-24 20:40:37 -05:00
parent 0178b5ad67
commit b6de22dd7c
2 changed files with 4 additions and 3 deletions

View File

@ -75,13 +75,14 @@ public enum FileLog {
}
public synchronized void logLine(String fullLine) {
System.out.println(fullLine);
String withDate = new Date() + END_OF_TIMESTAND_TAG + fullLine;
System.out.println(withDate);
if (suspendLogging)
return;
if (fileLog == null)
return;
try {
fileLog.write((new Date() + END_OF_TIMESTAND_TAG + fullLine + "\r\n").getBytes());
fileLog.write((withDate + "\r\n").getBytes());
fileLog.flush();
} catch (IOException e) {
throw new IllegalStateException(e);

View File

@ -10,7 +10,7 @@ public interface Logger {
Logger CONSOLE = new Logger() {
@Override
public void trace(String msg) {
System.out.println(msg);
System.out.println(new Date() + " " + msg);
}
@Override