mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Fix preloader log not appearing in file log for NetLauncher
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using BepInEx.Bootstrap;
|
||||
using BepInEx.Preloader.Core.Logging;
|
||||
|
||||
namespace BepInEx.NetLauncher
|
||||
{
|
||||
@@ -16,5 +17,12 @@ namespace BepInEx.NetLauncher
|
||||
|
||||
return pluginInstance;
|
||||
}
|
||||
|
||||
protected override void InitializeLoggers()
|
||||
{
|
||||
base.InitializeLoggers();
|
||||
|
||||
ChainloaderLogHelper.RewritePreloaderLogs();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,9 @@ namespace BepInEx.NetLauncher
|
||||
|
||||
public static void Start(string[] args)
|
||||
{
|
||||
var preloaderListener = new PreloaderConsoleListener();
|
||||
Logger.Listeners.Add(preloaderListener);
|
||||
|
||||
if (string.IsNullOrEmpty(ConfigEntrypointExecutable.Value))
|
||||
{
|
||||
Log.LogFatal($"Entry executable was not set. Please set this in your config before launching the application");
|
||||
@@ -98,6 +101,8 @@ namespace BepInEx.NetLauncher
|
||||
|
||||
Log.LogMessage("Preloader finished");
|
||||
|
||||
Logger.Listeners.Remove(preloaderListener);
|
||||
|
||||
var chainloader = new NetChainloader();
|
||||
chainloader.Initialize();
|
||||
chainloader.Execute();
|
||||
|
||||
Reference in new issue
Block a user