Use Environment.ProcessPath instead of GetCurrentProcess().MainModule.FileName

GetCurrentProcess().MainModule.FileName is expensive, Environment.ProcessPath added in net6
This commit is contained in:
Qstick 2023-01-09 22:14:22 -06:00 committed by Bogdan
commit ddb8c8dffe

View file

@ -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);