We currently have an eventlog which we would like to export to a file at some point. I've currently set it up to something like this:
public static void ExtractLog() {
var logSession = new EventLogSession();
logSession.ExportLogAndMessages(SPDClientLog, PathType.LogName, "*", @"C:\Users\Public\logfile.evtx", true, CultureInfo.CurrentCulture);
logSession.Dispose();
}
But from what I understand this means the logfile will be overwritten every time we run the method. What we would like to have is different copies everytime we export, up to say 10 files or so.
Is this possible to do using the eventlog?