Always log the hosting startup assemblies (#982)
This commit is contained in:
parent
ddb1bfeb20
commit
32bed162a8
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue