How do I turn off the logging done by ASP.NET for each request e.g.
INFO 09:38:41 User profile is available. Using \'C:\\Users\\xxxx xxxx\\AppData\\L
I'm not sure if I am missing something but don't you just want to raise the log level for the Microsoft logs?
Edit appsettings.json (assumes .AddJsonFile("appsettings.json", ...))
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Trace",
"System": "Information",
"Microsoft": "Information"
To
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Trace",
"System": "Information",
"Microsoft": "None"
Or the same modification via environment variables (assumes .AddEnvironmentVariables())
Logging:LogLevel:Microsoft=None
You can also be more specific, the following reduces most entries but leaves Microsoft.AspNetCore.Hosting.Internal.WebHost at Information.
"Microsoft": "Information",
"Microsoft.AspNetCore.Mvc.Internal": "Warning",
"Microsoft.AspNetCore.Authentication": "Warning"
Appologies if this doesn't work for log4net