private static void SetupLogging() { if ((Program.LaunchParameters.ContainsKey("-logfile") ? 1 : 0) != 0) { string launchParameter = Program.LaunchParameters["-logfile"]; ConsoleOutputMirror.ToFile(launchParameter == null || launchParameter.Trim() == "" ? Path.Combine(Main.SavePath, "Logs", string.Format("Log_{0}.log", (object)DateTime.Now.ToString("yyyyMMddHHmmssfff"))) : Path.Combine(launchParameter, string.Format("Log_{0}.log", (object)DateTime.Now.ToString("yyyyMMddHHmmssfff")))); } if (!Program.LaunchParameters.ContainsKey("-logerrors")) { return; } Program.HookAllExceptions(); }
private static void SetupLogging() { if (LaunchParameters.ContainsKey("-logfile")) { string text = LaunchParameters["-logfile"]; text = ((text != null && !(text.Trim() == "")) ? Path.Combine(text, $"Log_{DateTime.Now:yyyyMMddHHmmssfff}.log") : Path.Combine(Main.SavePath, "Logs", $"Log_{DateTime.Now:yyyyMMddHHmmssfff}.log")); ConsoleOutputMirror.ToFile(text); } CrashWatcher.Inititialize(); CrashWatcher.DumpOnException = LaunchParameters.ContainsKey("-minidump"); CrashWatcher.LogAllExceptions = LaunchParameters.ContainsKey("-logerrors"); if (LaunchParameters.ContainsKey("-fulldump")) { Console.WriteLine("Full Dump logs enabled."); CrashWatcher.EnableCrashDumps(CrashDump.Options.WithFullMemory); } }
// Token: 0x06000495 RID: 1173 RVA: 0x0029423C File Offset: 0x0029243C private static void SetupLogging() { if (Program.LaunchParameters.ContainsKey("-logfile")) { string text = Program.LaunchParameters["-logfile"]; if (text == null || text.Trim() == "") { text = Path.Combine(Main.SavePath, "Logs", string.Format("Log_{0}.log", DateTime.Now.ToString("yyyyMMddHHmmssfff"))); } else { text = Path.Combine(text, string.Format("Log_{0}.log", DateTime.Now.ToString("yyyyMMddHHmmssfff"))); } ConsoleOutputMirror.ToFile(text); } if (Program.LaunchParameters.ContainsKey("-logerrors")) { Program.HookAllExceptions(); } }