Move logger setup earlier.
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -36,13 +36,16 @@ namespace WalletWasabi.Fluent.Desktop
TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
bool runGui = true;
+ // Initialize the logger.
+ string dataDir = EnvironmentHelpers.GetDataDir(Path.Combine("WalletWasabi", "Client"));
+ SetupLogger(dataDir, args);
+
try
{
if (CrashReporter.TryGetExceptionFromCliArgs(args, out var exceptionToShow))
{
// Show the exception.
BuildCrashReporterApp(exceptionToShow).StartWithClassicDesktopLifetime(args);
-
runGui = false;
}
}
@@ -60,11 +63,7 @@ namespace WalletWasabi.Fluent.Desktop
{
try
{
- string dataDir = EnvironmentHelpers.GetDataDir(Path.Combine("WalletWasabi", "Client"));
-
- SetupLogger(dataDir, args);
var (uiConfig, config) = LoadOrCreateConfigs(dataDir);
-
singleInstanceChecker = new SingleInstanceChecker(config.Network);
singleInstanceChecker.EnsureSingleOrThrowAsync().GetAwaiter().GetResult();

Move logger setup earlier.