public static void Start() { Log.Main.Inform("Version compiled: " + Cliver.Bot.Program.GetCustomizationCompiledTime().ToString()); Log.Main.Inform("Command line parameters: " + string.Join("|", Environment.GetCommandLineArgs())); if (This != null) { throw new Exception("Previous session was not closed."); } new Session(); if (This == null) { return; } BotCycle.Start(); }
public static void Start() { Log.Initialize(Log.Mode.SESSIONS, Cliver.Bot.Properties.Log.Default.PreWorkDir, Cliver.Bot.Properties.Log.Default.WriteLog, Cliver.Bot.Properties.Log.Default.DeleteLogsOlderDays); Log.Main.Inform("Version compiled: " + Cliver.Bot.Program.GetCustomizationCompiledTime().ToString()); Log.Main.Inform("Command line parameters: " + string.Join("|", Environment.GetCommandLineArgs())); if (This != null) { throw new Exception("Previous session was not closed."); } new Session(); if (This == null) { return; } BotCycle.Start(); }
public static void Start() { try { if (!Settings.Log.WriteLog) { Log.DefaultLevel = Log.Level.NONE; } Log.Initialize(Log.Mode.FOLDER_PER_SESSION, new List <string> { Settings.Log.PreWorkDir }, Settings.Log.DeleteLogsOlderDays); Log.Main.Inform("Version compiled: " + Program.GetCustomizationCompiledTime().ToString()); Log.Main.Inform("Command line parameters: " + string.Join("|", Environment.GetCommandLineArgs())); if (This != null) { throw new Exception("Previous session was not closed."); } Activator.Create <Session>(true); if (This == null) { return; } BotCycle.Start(); Session.State = SessionState.RUNNING; This.Storage.WriteState(SessionState.RUNNING, new { }); } catch (ThreadAbortException) { Close(); throw; } catch (Exception e) { Session.__ErrorClose(e, true); } }