From ddb8c8dffee8065452d48b6d4c35799feeac0f3a Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 9 Jan 2023 22:14:22 -0600 Subject: [PATCH] Use Environment.ProcessPath instead of GetCurrentProcess().MainModule.FileName GetCurrentProcess().MainModule.FileName is expensive, Environment.ProcessPath added in net6 --- src/NzbDrone.Host/Bootstrap.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index b3f9a4f82..c01f0eeaa 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -44,7 +44,9 @@ namespace NzbDrone.Host { try { - Logger.Info("Starting Lidarr - {0} - Version {1}", Assembly.GetCallingAssembly().Location, Assembly.GetExecutingAssembly().GetName().Version); + Logger.Info("Starting Lidarr - {0} - Version {1}", + Environment.ProcessPath, + Assembly.GetExecutingAssembly().GetName().Version); var startupContext = new StartupContext(args);