From 2f12c79e7180f5f40ce2a2e3529ff1d7cb1c3d02 Mon Sep 17 00:00:00 2001 From: Bepis <36346617+bbepis@users.noreply.github.com> Date: Fri, 6 Nov 2020 13:23:55 +1100 Subject: [PATCH] Log plurals Rebase of 0f4ac05 --- BepInEx.Core/Bootstrap/BaseChainloader.cs | 2 +- BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs | 2 +- BepInEx.Preloader.Unity/UnityPreloader.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BepInEx.Core/Bootstrap/BaseChainloader.cs b/BepInEx.Core/Bootstrap/BaseChainloader.cs index ffec494..e309822 100644 --- a/BepInEx.Core/Bootstrap/BaseChainloader.cs +++ b/BepInEx.Core/Bootstrap/BaseChainloader.cs @@ -154,7 +154,7 @@ namespace BepInEx.Bootstrap { var plugins = DiscoverPlugins(); - Logger.LogInfo($"{plugins.Count} plugins to load"); + Logger.LogInfo($"{plugins.Count} plugin{(plugins.Count == 1 ? "" : "s")} to load"); ModifyLoadOrder(plugins); diff --git a/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs b/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs index c9e848b..0cca81e 100644 --- a/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs +++ b/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs @@ -160,7 +160,7 @@ namespace BepInEx.Preloader.Core var assName = ass.GetName(); Logger.Log(patcherCollection.Any() ? LogLevel.Info : LogLevel.Debug, - $"Loaded {patcherCollection.Count} patcher method{(patcherCollection.Count > 1 ? "s" : "")} from {assName.Name}, Version={assName.Version}"); + $"Loaded {patcherCollection.Count} patcher method{(patcherCollection.Count == 1 ? "" : "s")} from [{assName.Name} {assName.Version}]"); } foreach (KeyValuePair patcher in sortedPatchers) diff --git a/BepInEx.Preloader.Unity/UnityPreloader.cs b/BepInEx.Preloader.Unity/UnityPreloader.cs index 2e8f535..274364d 100644 --- a/BepInEx.Preloader.Unity/UnityPreloader.cs +++ b/BepInEx.Preloader.Unity/UnityPreloader.cs @@ -88,7 +88,7 @@ namespace BepInEx.Preloader.Unity assemblyPatcher.AddPatchersFromDirectory(Paths.PatcherPluginPath); - Log.LogInfo($"{assemblyPatcher.PatcherPlugins.Count} patcher plugin(s) loaded"); + Log.LogInfo($"{assemblyPatcher.PatcherPlugins.Count} patcher plugin{(assemblyPatcher.PatcherPlugins.Count == 1 ? "" : "s")} loaded"); assemblyPatcher.LoadAssemblyDirectory(ManagedPath);