Skip to content
Rolf Kristensen edited this page May 13, 2022 · 30 revisions

NLog

Welcome

  • NLog.Extensions.Logging - Provides AddNLog() to register NLog as LoggingProvider for Microsoft.Extension.Loggging. And supports NLog config in appsettings.json.
  • NLog.Extensions.Hosting - Provides UseNLog() to register NLog as LoggingProvider for Microsoft.Extension.Hosting. If running ASP.NET Core, then it is recommended to instead use NLog.Web.AspNetCore-nuget-package.

Microsoft Logging and NLog Logging

Note if just wanting to use NLog on .NET Core without Microsoft ILogger-abstraction, then just use the standard NLog-nuget-package.

Getting started

For configuration options: http://nlog-project.org/config/

For general usage of NLog: NLog wiki