diff --git a/src/Microsoft.AspNetCore.Hosting/Internal/WebHost.cs b/src/Microsoft.AspNetCore.Hosting/Internal/WebHost.cs index ffc3501c8b..5bf36c5676 100644 --- a/src/Microsoft.AspNetCore.Hosting/Internal/WebHost.cs +++ b/src/Microsoft.AspNetCore.Hosting/Internal/WebHost.cs @@ -122,6 +122,15 @@ namespace Microsoft.AspNetCore.Hosting.Internal _logger.Started(); + // Log the fact that we did load hosting startup assemblies. + if (_logger.IsEnabled(LogLevel.Debug)) + { + foreach (var assembly in _options.HostingStartupAssemblies) + { + _logger.LogDebug("Loaded hosting startup assembly {assemblyName}", assembly); + } + } + // REVIEW: Is this the right place to log these errors? if (_hostingStartupErrors != null) { @@ -130,17 +139,6 @@ namespace Microsoft.AspNetCore.Hosting.Internal _logger.HostingStartupAssemblyError(exception); } } - else - { - // If there were no errors then just log the fact that we did load hosting startup assemblies. - if (_logger.IsEnabled(LogLevel.Debug)) - { - foreach (var assembly in _options.HostingStartupAssemblies) - { - _logger.LogDebug("Loaded hosting startup assembly {assemblyName}", assembly); - } - } - } } private void EnsureApplicationServices()