Example code for reading eventlog