Logger filepath must be always set before other log operations
MODIFY
MagicalCryptoWallet.Backend/Program.cs
MagicalCryptoWallet.Backend/Program.cs
@@ -18,9 +18,9 @@ namespace MagicalCryptoWallet.Backend
{
try
{
+ Logger.SetFilePath(Path.Combine(Global.DataDir, "Logs.txt"));
Logger.SetMinimumLevel(LogLevel.Info);
Logger.SetModes(LogMode.Debug, LogMode.Console, LogMode.File);
- Logger.SetFilePath(Path.Combine(Global.DataDir,"Logs.txt"));
await Global.InitializeAsync();

MODIFY
MagicalCryptoWallet.Tests/SharedFixture.cs
MagicalCryptoWallet.Tests/SharedFixture.cs
@@ -26,9 +26,9 @@ namespace MagicalCryptoWallet.Tests
{
// Initialize tests...
+ Logger.SetFilePath(Path.Combine(DataDir, "Logs.txt"));
Logger.SetMinimumLevel(LogLevel.Info);
Logger.SetModes(LogMode.Debug, LogMode.Console, LogMode.File);
- Logger.SetFilePath(Path.Combine(DataDir, "Logs.txt"));
}
public void Dispose()

Logger filepath must be always set before other log operations