-
Notifications
You must be signed in to change notification settings - Fork 151
Home
Rolf Kristensen edited this page May 13, 2022
·
30 revisions
-
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.
- 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 with ASP.NET Core 6
- Getting started with ASP.NET Core 5
- Getting started with ASP.NET Core 3
- Getting started with ASP.NET Core 2
- Getting started with .NET Core 2 Console application
- Getting started with ASP.NET Core 1 (csproj - vs2017)
- Getting Started with ASP.NET Core 1 (project.json - vs2015)
- Multiple blogs to get started with ASP.NET Core and NLog
- Using NLog with appsettings.json
For configuration options: http://nlog-project.org/config/
For general usage of NLog: NLog wiki