Notes GetLogger injected ILogger - NLog/NLog.Extensions.Logging GitHub Wiki
Some important notes:
- The configuration in
LogManager.Configurationwill be used forLogManager.GetLogger/LogManager.GetCurrentClassLoggerand injectedILogger<T> - When using "Microsoft.Extensions.DependencyInjection", the injected
ILogger<T>is preferred overLogManager.GetLogger/LogManager.GetCurrentClassLogger - When using the injected
ILogger<T>, you need to enable the integration withbuilder.AddNLog(that's in your code example).