I could use the below java JNA code to read a windows event log
EventLogIterator iter = new EventLogIterator("EventLogName");
while(iter.hasNext()) {
EventLogRecord record = iter.next();
System.out.println(record.getRecordId()
+ ": Event ID: " + record.getEventId()
+ ", Event Type: " + record.getType()
+ ", Event Source: " + record.getSource());
}
I want to read/capture only new events.
Is there an option/API in JNA (or any other java library) to listen to windows event log?