From bbe872524d18e356ca7c4b1abf44e3a247decd2b Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Thu, 3 Dec 2020 20:12:05 +0800 Subject: [PATCH 1/2] optimize load plugin logs --- Emby.Server.Implementations/ApplicationHost.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 5498f5a10f..ebba5f02fc 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -774,17 +774,10 @@ namespace Emby.Server.Implementations if (Plugins != null) { - var pluginBuilder = new StringBuilder(); - foreach (var plugin in Plugins) { - pluginBuilder.Append(plugin.Name) - .Append(' ') - .Append(plugin.Version) - .AppendLine(); + Logger.LogInformation("Loaded plugin: {PluginName} {PluginVersion}", plugin.Name.ToString(), plugin.Version.ToString()); } - - Logger.LogInformation("Plugins: {Plugins}", pluginBuilder.ToString()); } _urlPrefixes = GetUrlPrefixes().ToArray(); From d496fd2d482aff50d59cc6534654fc7a29132d78 Mon Sep 17 00:00:00 2001 From: Nyanmisaka Date: Thu, 3 Dec 2020 21:34:25 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ebba5f02fc..37d6f9db4f 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -776,7 +776,7 @@ namespace Emby.Server.Implementations { foreach (var plugin in Plugins) { - Logger.LogInformation("Loaded plugin: {PluginName} {PluginVersion}", plugin.Name.ToString(), plugin.Version.ToString()); + Logger.LogInformation("Loaded plugin: {PluginName} {PluginVersion}", plugin.Name, plugin.Version); } }