diff --git a/src/SpaceWarp.Preload/API/BasePatcher.cs b/src/SpaceWarp.Preload/API/BasePatcher.cs index 2d8b0ef..ae45daf 100644 --- a/src/SpaceWarp.Preload/API/BasePatcher.cs +++ b/src/SpaceWarp.Preload/API/BasePatcher.cs @@ -14,7 +14,7 @@ public abstract class BasePatcher : IPatcher /// /// Logger for the patcher. /// - protected internal ManualLogSource Logger => Entrypoint.LogSource; + protected internal ManualLogSource Logger; /// public abstract IEnumerable DLLsToPatch { get; } diff --git a/src/SpaceWarp.Preload/Entrypoint.cs b/src/SpaceWarp.Preload/Entrypoint.cs index e200950..c5c1efa 100644 --- a/src/SpaceWarp.Preload/Entrypoint.cs +++ b/src/SpaceWarp.Preload/Entrypoint.cs @@ -113,6 +113,7 @@ private static void AddPatchersFromDLL(string dllPath) LogSource.LogInfo($"Found patcher: {patcherType.Name}"); var loadedAsm = Assembly.LoadFile(dllPath); var patcher = (BasePatcher)Activator.CreateInstance(loadedAsm.GetType(patcherType.FullName)); + patcher.Logger = Logger.CreateLogSource(patcherType.Name); Patchers.Add(patcher); } }