Skip to content

Commit

Permalink
Add missing (de)assignment of console logging handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Banane9 committed Oct 1, 2024
1 parent 41f44ef commit 6131fa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MonkeyLoader/Logging/LoggingConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,15 @@ private void ShouldLogToConsoleChanged(object sender, ConfigKeyChangedEventArgs<
return;

if (configKeyChangedEventArgs.NewValue)
{
ConsoleLoggingHandler.TryConnect();
Controller.Handler += ConsoleLoggingHandler.Instance;
}
else
{
ConsoleLoggingHandler.Disconnect();
Controller.Handler -= ConsoleLoggingHandler.Instance;
}
}
}
}

0 comments on commit 6131fa1

Please sign in to comment.