Skip to content

Notes GetLogger injected ILogger

Julian Verdurmen edited this page Feb 20, 2019 · 2 revisions

Some important notes:

  • The configuration in LogManager.Configuration will be used for LogManager.GetLogger/LogManager.GetCurrentClassLogger and injected ILogger<T>
  • When using "Microsoft.Extensions.DependencyInjection", the injected ILogger<T> is preferred over LogManager.GetLogger/LogManager.GetCurrentClassLogger
  • When using the injected ILogger<T>, you need to enable the integration with builder.AddNLog (that's in your code example).