Home - NLog/NLog.Extensions.Logging GitHub Wiki
Welcome
- NLog.Extensions.Logging - Provides
AddNLog()
to register NLog as LoggingProvider for Microsoft.Extension.Logging. 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
- NLog GetCurrentClassLogger and Microsoft ILogger
- NLog properties with Microsoft Extension Logging
- How to use structured logging
- NLog configuration with appsettings.json
- NLog Console vs AddConsole
- Capture System.Diagnostics.Activity.Current with NLog
Note if just wanting to use NLog on .NET Core without Microsoft ILogger-abstraction, then just use the standard NLog-nuget-package.
Getting started
- Getting started with ASP.NET Core 6
- Getting started with ASP.NET Core 5
- Getting started with ASP.NET Core 3
- Getting started with .NET Core Console application
- Using NLog with appsettings.json
- Multiple blogs to get started with ASP.NET Core and NLog
For configuration options: http://nlog-project.org/config/
For general usage of NLog: NLog wiki