Try fix logging
MODIFY
WalletWasabi.Gui/CommandLine/CommandInterpreter.cs
WalletWasabi.Gui/CommandLine/CommandInterpreter.cs
using Mono.Options;
using System;
+using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
+using WalletWasabi.Logging;
namespace WalletWasabi.Gui.CommandLine
{
@@ -15,11 +17,6 @@ namespace WalletWasabi.Gui.CommandLine
var showHelp = false;
var showVersion = false;
- if (args.Length == 0)
- {
- return true;
- }
-
try
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -28,6 +25,14 @@ namespace WalletWasabi.Gui.CommandLine
Console.WriteLine();
}
+ Logger.InitializeDefaults(Path.Combine(Global.DataDir, "Logs.txt"));
+ Logger.LogStarting("Wasabi");
+
+ if (args.Length == 0)
+ {
+ return true;
+ }
+
OptionSet options = null;
var suite = new CommandSet("wassabee") {
"Usage: wassabee [OPTIONS]+",

MODIFY
WalletWasabi.Gui/CommandLine/Daemon.cs
WalletWasabi.Gui/CommandLine/Daemon.cs
@@ -14,24 +14,6 @@ namespace WalletWasabi.Gui.CommandLine
{
internal static async Task RunAsync(string walletName, LogLevel? logLevel, bool mixAll, bool keepMixAlive, bool silent)
{
- Logger.InitializeDefaults(Path.Combine(Global.DataDir, "Logs.txt"));
-
- if (logLevel.HasValue)
- {
- Logger.SetMinimumLevel(logLevel.Value);
- }
- if (silent)
- {
- Logger.Modes.Remove(LogMode.Console);
- Logger.Modes.Remove(LogMode.Debug);
- }
- else
- {
- Logger.Modes.Add(LogMode.Console);
- Logger.Modes.Add(LogMode.Debug);
- }
- Logger.LogStarting("Wasabi");
-
KeyManager keyManager = TryGetKeymanagerFromWalletName(walletName);
if (keyManager is null)
{

Try fix logging