Browse Source

Fix log messages being duplicated
Rebase of c498454

Bepis 4 years ago
parent
commit
574077c23c
1 changed files with 5 additions and 4 deletions
  1. 5 4
      BepInEx.Unity/Bootstrap/UnityChainloader.cs

+ 5 - 4
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)