/NLog.Extensions.Logging

NLog Provider for Microsoft.Extensions.Logging for .NET Standard libraries and .NET (Core) applications

Primary LanguageC#BSD 2-Clause "Simplified" LicenseBSD-2-Clause

NLog

NLog.Extensions.Logging & NLog.Extensions.Hosting

NuGet Release

NuGet Release

Build status

NLog.Extensions.Logging

NLog.Extensions.Logging makes it possible to use NLog together with Microsoft ILogger-abstraction and Dependency Injection. It provides extension methods to register NLog as LoggingProvider for Microsoft Extension Logging using AddNLog() or UseNLog().

Note if using ASP.NET Core then instead install NLog.Web.AspNetCore.

NLog.Extensions.Logging also makes it possible to load NLog Configurations from appsettings.json

Notice the standard NLog NuGet package is enough for using NLog Logger with simple console application on the .NET Core platform. Just add NLog.config file to the project, and follow the tutorial for using GetCurrentClassLogger().

Getting Started Tutorials: