mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Move logging module initialization after setting home directory
This commit is contained in:
@@ -266,14 +266,6 @@ namespace ArchiSteamFarm {
|
|||||||
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||||
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
||||||
|
|
||||||
Logging.InitCoreLoggers();
|
|
||||||
Logging.LogGenericInfo("ASF V" + SharedInfo.Version);
|
|
||||||
|
|
||||||
if (!Runtime.IsRuntimeSupported) {
|
|
||||||
Logging.LogGenericError("ASF detected unsupported runtime version, program might NOT run correctly in current environment. You're running it at your own risk!");
|
|
||||||
Thread.Sleep(10000);
|
|
||||||
}
|
|
||||||
|
|
||||||
string homeDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
string homeDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||||
if (!string.IsNullOrEmpty(homeDirectory)) {
|
if (!string.IsNullOrEmpty(homeDirectory)) {
|
||||||
Directory.SetCurrentDirectory(homeDirectory);
|
Directory.SetCurrentDirectory(homeDirectory);
|
||||||
@@ -296,6 +288,14 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logging.InitCoreLoggers();
|
||||||
|
Logging.LogGenericInfo("ASF V" + SharedInfo.Version);
|
||||||
|
|
||||||
|
if (!Runtime.IsRuntimeSupported) {
|
||||||
|
Logging.LogGenericError("ASF detected unsupported runtime version, program might NOT run correctly in current environment. You're running it at your own risk!");
|
||||||
|
Thread.Sleep(10000);
|
||||||
|
}
|
||||||
|
|
||||||
// Parse pre-init args
|
// Parse pre-init args
|
||||||
if (args != null) {
|
if (args != null) {
|
||||||
ParsePreInitArgs(args);
|
ParsePreInitArgs(args);
|
||||||
|
|||||||
Reference in New Issue
Block a user