Add support for logging/catching also very early messages

This commit is contained in:
JustArchi
2016-07-04 22:30:29 +02:00
parent c00943bb74
commit 38eb130217
2 changed files with 35 additions and 22 deletions

View File

@@ -458,7 +458,9 @@ namespace ArchiSteamFarm {
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
Logging.InitCoreLoggers();
Logging.LogGenericInfo("ASF V" + Version);
Directory.SetCurrentDirectory(ExecutableDirectory);
InitServices();
@@ -502,7 +504,7 @@ namespace ArchiSteamFarm {
}
// From now on it's server mode
Logging.Init();
Logging.InitEnhancedLoggers();
if (!Directory.Exists(ConfigDirectory)) {
Logging.LogGenericError("Config directory doesn't exist!");