From 574077c23cc8491346d8c47bd880f258dc52feaf Mon Sep 17 00:00:00 2001 From: Bepis <36346617+bbepis@users.noreply.github.com> Date: Fri, 6 Nov 2020 01:14:28 +1100 Subject: [PATCH] Fix log messages being duplicated Rebase of c498454 --- BepInEx.Unity/Bootstrap/UnityChainloader.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BepInEx.Unity/Bootstrap/UnityChainloader.cs b/BepInEx.Unity/Bootstrap/UnityChainloader.cs index 052d71a..c6f3b6d 100644 --- a/BepInEx.Unity/Bootstrap/UnityChainloader.cs +++ b/BepInEx.Unity/Bootstrap/UnityChainloader.cs @@ -51,10 +51,6 @@ namespace BepInEx.Unity.Bootstrap { Logger.Listeners.Add(new UnityLogListener()); - if (ConfigUnityLogging.Value) - Logger.Sources.Add(new UnityLogSource()); - - base.InitializeLoggers(); @@ -69,7 +65,12 @@ namespace BepInEx.Unity.Bootstrap DiskLogListener.BlacklistedSources.Add("Unity Log"); } + ChainloaderLogHelper.RewritePreloaderLogs(); + + + if (ConfigUnityLogging.Value) + Logger.Sources.Add(new UnityLogSource()); } public override BaseUnityPlugin LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly)