Add timestamps to relevant log output
This commit is contained in:
parent
4d0585b68a
commit
ad178727f1
|
@ -33,14 +33,14 @@ public class Main {
|
|||
// Go go gadget import service!
|
||||
try {
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": Begin import of data ...");
|
||||
importService.partialRun(12000);
|
||||
System.out.println("Import of data done!");
|
||||
importService.partialRun(5000);
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": Import of data done!");
|
||||
} catch (EOFException | PcapNativeException | TimeoutException | NotOpenException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// Done
|
||||
odhs.close();
|
||||
System.out.println("End of program.");
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": End of program.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -56,11 +56,13 @@ public abstract class AbstractNetdataImportService implements NetdataResultObser
|
|||
}
|
||||
this.packetCounter++;
|
||||
if(this.limitedImportRun && this.packetCounter > this.packetLimit) {
|
||||
System.out.println("Limited import run done. Breaking.");
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": Limited import run done. Breaking.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": Main import done, executing afterImport() ...");
|
||||
this.afterImport();
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": Call of afterImport() returned!");
|
||||
}
|
||||
|
||||
public void handleEthernetPacket(EthernetPacket ether, long ts, int ms) {
|
||||
|
|
|
@ -217,7 +217,7 @@ public class NodeBasedImportService extends AbstractNetdataImportService {
|
|||
}
|
||||
|
||||
public void afterImport() {
|
||||
System.out.println("All done. Processing collected TcpConnections ...");
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": All done. Processing collected TcpConnections ...");
|
||||
for(LinkedList<TcpConnectionModel> connList : this.knownTcpConnections.values()) {
|
||||
for(TcpConnectionModel conn : connList) {
|
||||
Vertex currentTcpConnection = this.og.addVertex("class:TcpConnection", conn.getArguments());
|
||||
|
@ -238,7 +238,7 @@ public class NodeBasedImportService extends AbstractNetdataImportService {
|
|||
}
|
||||
}
|
||||
}
|
||||
System.out.println("Done importing TcpConnections. End of afterImport() routine.");
|
||||
System.out.println(System.currentTimeMillis()/1000L + ": Done importing TcpConnections. End of afterImport() routine.");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue