'.NET 6 logging to file

I'm upgrading a .NET core application that uses MS logging to .NET 6. Before it was configured to log to a file with appsettings.json looking like below:

"Logging": {
    "LogFileName": "{MMddyyyy}.log",
    "LogFilePath": "E:\\Logs",   
    "MaxLogFileSize": 20,
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Debug",
      "System": "Information"
    }

Looks like the LogFileName and other attributes under Logging are invalid now. Where do I put these attributes now? I tried "Debug" but that doesn't write to a file.



Solution 1:[1]

Looks like it is not provided by .NET 6 OOTB any longer. Need to use a 3rd party logger to log to a file now.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Los Morales