Closed guardrex closed 5 years ago
Ok, thanks.
How do you want to handle it in the topic+sample? We can add a remark to the ConfigureLogging
section of the topic, but that doesn't address the sample app including the call to AddLogging
when it isn't necessary.
If anything it's there as an example for ConfigureServices. Have anything else that could go there?
It would be worth mentioning somewhere what the default services are.
Yes, we have the hosted services there because the sample for the topic is the hosted services sample. The full method is ...
.ConfigureServices((hostContext, services) =>
{
services.AddLogging();
services.AddHostedService<LifetimeEventsHostedService>();
services.AddHostedService<TimedHostedService>();
})
It would be worth mentioning somewhere what the default services are.
Very good. :+1:
I've opened https://github.com/aspnet/Docs/issues/8893 to address these.
@Tratcher In the Generic Host sample app, we have both
AddLogging
in service config andAddConsole
+AddDebug
inConfigureLogging
. I noticed that the call toAddLogging
isn't required, and I speculated that perhapsAddConsole
andAddDebug
callAddLogging
on their own.We don't remark at all on
AddLogging
; and forConfigureLogging
all we say is ...Do we need to make any changes or call anything out in the topic/sample regarding logging activation?