I need to save Windows event logs in some kind of file, now I use:
var els = new EventLogSession(); els.ExportLogAndMessages("Application", PathType.LogName, "*", Path.Combine("c:\\Application.evtx"), false, CultureInfo.CurrentCulture);
this works fine, but I want to get logs between the DateTime range, I suspect that the third parameter in ExportLogAndMessages "query" might help me.
Now, how to write this โrequestโ, and if the โrequestโ does not help, it's all the same for that.
source share