more timestamps
This commit is contained in:
parent
cfe39d72f9
commit
c8c0985fcf
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue