Sandro
Sandro

Reputation: 3160

How can I get back ASP.NET Core verbose request logging in 3.x

If you create a new web application project in .NET Core 2.1 and 3.1, there is a difference in verbosity when starting them

.NET Core 2.1 looks like this Request Logging in .NET Core 2.1

.NET Core 3.1 looks like this Request Logging in .NET Core 3.1

How can I get these additional messages in 3.1?

I noted that instead of WebHost, 3.1 uses Host in Program.cs. But even if I change it back it still doesn't work.

Upvotes: 1

Views: 538

Answers (1)

Fei Han
Fei Han

Reputation: 27815

If you'd like to get requests and route matching related Information level logs in Console output, you can try to add following setting in the Logging section of appsettings.json file.

"Console": {
  "LogLevel": {
    "Microsoft": "Information"
  }
}

Test Result

enter image description here

Upvotes: 1

Related Questions