public static void Initialize()
{
_stopThread = false;
try
{
_thread = new Thread(new ThreadStart(Scan));
string folderName = Path.Combine(Advanced_Combat_Tracker.ActGlobals.oFormActMain.AppDataFolder.FullName, @"BNSLogs\");
if (!Directory.Exists(folderName))
Directory.CreateDirectory(folderName);
_logFileName = Path.Combine(folderName, "combatlog_" + DateTime.Now.ToString("yyyy-MM-dd") + ".log");
File.AppendAllText(_logFileName, null);
// update filename in ACT
Advanced_Combat_Tracker.ActGlobals.oFormActMain.LogFilePath = _logFileName;
Advanced_Combat_Tracker.ActGlobals.oFormActMain.OpenLog(false, false); // GetCurrentZone flag means it will scan for the zone regex in the log file.
_thread.Start();
}
catch (Exception ex)
{
BNS_ACT_Plugin.LogParserMessage("Error [BNS_Log.Initialize] " + ex.ToString().Replace(Environment.NewLine, " "));
_stopThread = true;
}
}