NLog.Extensions.Logging 5.4.0
NLog.Extensions.Logging
Integrates NLog as Logging provider for Microsoft.Extensions.Logging, by just calling AddNLog() on the Logging-builder.
Providing features like:
- Capture structured message properties from the Microsoft ILogger
- Capture scope context properties from the Microsoft ILogger
BeginScope - Load NLog configuration from appsettings.json
- Routing logging output to multiple destinations via the available NLog Targets
- Enrich logging output with additional context details via the available NLog LayoutRenderers
- Rendering logging output into standard formats like JSON, CVS, W3C ELF and XML using NLog Layouts.
If using ASP.NET Core then consider using NLog.Web.AspNetCore.
Supported platforms:
- .NET 5, 6, 7 and 8
- .NET Core 1, 2 and 3
- .NET Standard 1.3+ and 2.0+
- .NET 4.6.1 - 4.8
Registration of NLog as logging provider:
builder.Logging.ClearProviders();
builder.Logging.AddNLog();
Useful Links:
Showing the top 20 packages that depend on NLog.Extensions.Logging.
| Packages | Downloads |
|---|---|
|
NLog.Web.AspNetCore
Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.
|
9 |
|
NLog.Web.AspNetCore
Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.
|
4 |
|
NLog.Web.AspNetCore
Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.
|
0 |
|
NLog.Web.AspNetCore
NLog LoggerProvider for Microsoft.Extensions.Logging and ASP.NET Core platform. Adds helpers and layout renderers for websites and web applications.
Supported platforms:
- For ASP.NET Core 5, .NET 5
- For ASP.NET Core 3, .NET Core 3.0
- For ASP.NET Core 2, .NET Standard 2.0+ and .NET 4.6+
- For ASP.NET Core 1, .NET Standard 1.5+ and .NET 4.5.x
|
0 |
ChangeLog:
- MicrosoftConsoleJsonLayout - TimestampLayout replaced by DateLayoutRenderer (#775) (@snakefoot)
- NLogLoggerFactory - New constructor with isolated NLog LogFactory as input parameter (#778) (@snakefoot)
- Updated to NLog v5.4 (#778) (@snakefoot)
Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD
NLog v5.2 changes how to load extensions: https://nlog-project.org/2023/05/30/nlog-5-2-trim-warnings.html
List of major changes in NLog 5.0: https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready.html
.NET Framework 4.6.1
- Microsoft.Extensions.Configuration.Abstractions (>= 2.1.0)
- Microsoft.Extensions.Logging (>= 2.1.0)
- NLog (>= 5.4.0)
.NET Standard 2.1
- NLog (>= 5.4.0)
- Microsoft.Extensions.Logging (>= 3.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.0)
.NET Standard 2.0
- NLog (>= 5.4.0)
- Microsoft.Extensions.Logging (>= 2.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 2.1.0)
.NET 8.0
- NLog (>= 5.4.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
.NET 6.0
- NLog (>= 5.4.0)
- Microsoft.Extensions.Logging (>= 6.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
.NET Standard 1.5
- NLog (>= 5.4.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 1.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 1.0.0)
- NETStandard.Library (>= 1.6.0)
.NET Standard 1.3
- Microsoft.Extensions.Configuration.Abstractions (>= 1.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 1.0.0)
- NETStandard.Library (>= 1.6.0)
- NLog (>= 5.4.0)