Reading windows event log using win32evtlog module
问题 Below is the code, It's giving the total 87399 number of the log, but when reading the logs it only returns a 7 record list. import win32evtlog server = 'localhost' logtype = 'Application' hand = win32evtlog.OpenEventLog(server,logtype) flags = win32evtlog.EVENTLOG_SEQUENTIAL_READ | win32evtlog.EVENTLOG_BACKWARDS_READ total = win32evtlog.GetNumberOfEventLogRecords(hand) events=win32evtlog.ReadEventLog(hand,flags,0) print "Total number of Event record ",total #Returning 87399 print "Log record