I want to log certain output in .net core webapi to a .txt file.
The Microsoft documentation says https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-6.0&WT.mc_id=DT-MVP-5002040#console
Call WebApplication.CreateBuilder, which adds the following logging providers:
Console
Debug
EventSource
EventLog: Windows only
There is no information on how to write to a .log file or a .txt file. It all says about console, debug and eventlog.
Am I missing something?