I am using Kestrel with .NET Core 2 to serve a Web API application.
I want hide exceptions that occur from displaying in the console window.
I am using Kestrel with .NET Core 2 to serve a Web API application.
I want hide exceptions that occur from displaying in the console window.
Copyright © 2021 Jogjafile Inc.
Try built-in Log filtering mechanism.
It should be
Microsoft.AspNetCore.Server.Kestrel
category name for such logs. Filter rule may be registered in code viaAddFilter
extension method forILoggingBuilder
: