NLog configuration in appsettings.json instead of nlog.config in .NET Core
Yes, this is possible but has a minimum version requirement. You must be using NLog.Extensions.Logging >= 1.5.0. Note that for ASP.NET Core applications this will be installed as a dependency if you install NLog.Web.AspNetCore >= 4.8.2. You can then create an NLog section in appsettings.json and load it with the following code: var config = … Read more