private static void InitializeConfig() { EDDOptions.Instance.Init(); string logpath = ""; try { logpath = EDDOptions.Instance.LogAppDirectory(); TraceLog.logroot = EDDOptions.Instance.AppDataDirectory; TraceLog.urlfeedback = Properties.Resources.URLProjectFeedback; if (!Debugger.IsAttached || EDDOptions.Instance.TraceLog) { TraceLog.Init(); } if (EDDOptions.Instance.LogExceptions) { TraceLog.RegisterFirstChanceExceptionHandler(); } } catch (Exception ex) { Trace.WriteLine($"Unable to create the folder '{logpath}'"); Trace.WriteLine($"Exception: {ex.Message}"); } SQLiteConnectionUser.EarlyReadRegister(); Debug.WriteLine(BaseUtils.AppTicks.TickCount100 + " Init config finished"); }
private static void InitializeConfig(bool noreposition) { EDDConfig.Options.Init(noreposition); if (EDDConfig.Options.ReadJournal != null && File.Exists(EDDConfig.Options.ReadJournal)) { DebugCode.ReadCmdLineJournal(EDDConfig.Options.ReadJournal); } string logpath = ""; try { logpath = Path.Combine(EDDConfig.Options.AppDataDirectory, "Log"); if (!Directory.Exists(logpath)) { Directory.CreateDirectory(logpath); } TraceLog.logroot = EDDConfig.Options.AppDataDirectory; TraceLog.urlfeedback = Properties.Resources.URLProjectFeedback; if (!Debugger.IsAttached || EDDConfig.Options.TraceLog) { TraceLog.Init(); } if (EDDConfig.Options.LogExceptions) { TraceLog.RegisterFirstChanceExceptionHandler(); } } catch (Exception ex) { Trace.WriteLine($"Unable to create the folder '{logpath}'"); Trace.WriteLine($"Exception: {ex.Message}"); } SQLiteConnectionUser.EarlyReadRegister(); EDDConfig.Instance.Update(false); }