logwizard
logwizard copied to clipboard
event log reader : forced refresh does not fully clear log
this is because the lock() on reading next lines can sometimes take too much time, and it interferes with forced_reload() (which also lock()s in order to clear the lines list).
the problem is that it's pretty much close to impossible to fully debug this because of how time consuming reading the event logs are.
as a workaround, I avoid force_reload() on event log viewer.
note that this issue happens only when you select "Open Log" and then select the Windows Event Log as log time - since this will cause a forced_reload() when the settings change.
What I should do:
- read from event logs in blocks (now, I'm locking for each Add())
- perhaps have two lists of last_events_ on read_next_lines_existing_events (so that one of them is used to retrieve the last entries, and on the other one I simply add from read_single_log_thread). This would avoid excessive locking in read_next_lines_existing_events