Always log the hosting startup assemblies (#982)

This commit is contained in:
David Fowler 2017-03-22 20:57:01 -07:00 committed by GitHub
parent ddb1bfeb20
commit 32bed162a8
1 changed files with 9 additions and 11 deletions

View File

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