NLog.Extensions.Logging 6.0.0-rc2

Prefix Reserved
This is a prerelease version of NLog.Extensions.Logging.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package NLog.Extensions.Logging --version 6.0.0-rc2
                    
NuGet\Install-Package NLog.Extensions.Logging -Version 6.0.0-rc2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.0-rc2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NLog.Extensions.Logging" Version="6.0.0-rc2" />
                    
Directory.Packages.props
<PackageReference Include="NLog.Extensions.Logging" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NLog.Extensions.Logging --version 6.0.0-rc2
                    
#r "nuget: NLog.Extensions.Logging, 6.0.0-rc2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=NLog.Extensions.Logging&version=6.0.0-rc2&prerelease
                    
Install NLog.Extensions.Logging as a Cake Addin
#tool nuget:?package=NLog.Extensions.Logging&version=6.0.0-rc2&prerelease
                    
Install NLog.Extensions.Logging as a Cake Tool

NLog.Extensions.Logging

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Integrates NLog as Logging provider for Microsoft.Extensions.Logging, by just calling AddNLog() on the Logging-builder.

Providing features like:

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:

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (328)

Showing the top 5 NuGet packages that depend on NLog.Extensions.Logging:

Package Downloads
NLog.Web.AspNetCore

Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.

TIKSN-Framework

This is a .NET Framework enhancement framework. Main features are Versioning, Finance, Currency, Foreign Exchange, Money, Pricing strategy, Telemetry, Composite Weighted Progress, Repository and Unity of Wok pattern implementation with Entity Framework Core, Network Connectivity Service and Triggering, Settings, Windows Registry configuration source, Azure Storage Repository, MongoDB Repository, NoDB Repository, Lingual and Regional Localization, Serialization, Rest Requester, Rest Repository, Dependency Injection, Composition Root Setup base classes.

NLog.Extensions.Hosting

NLog extension for Microsoft.Extensions.Hosting for logging in .NET Standard libraries and .NET Core applications using IHostBuilder. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore

NLog.Web.AspNetCore.Targets.Gelf

Gelf4NLog is an NLog target implementation to push log messages to GrayLog2.

NStratis

The C# Bitcoin Library based on NBitcoin

GitHub repositories (70)

Showing the top 20 popular GitHub repositories that depend on NLog.Extensions.Logging:

Repository Stars
microsoft/PowerToys
Windows system utilities to maximize productivity
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
Radarr/Radarr
Movie organizer/manager for usenet and torrent users.
quartznet/quartznet
Quartz Enterprise Scheduler .NET
NLog/NLog
NLog - Flexible and Structured Logging for Various .NET Platforms
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
Prowlarr/Prowlarr
Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps, supporting management of both Torrent Trackers and Usenet Indexers.
Lidarr/Lidarr
Looks and smells like Sonarr but made for music.
cyanfish/naps2
Scan documents to PDF and more, as simply as possible.
robinrodricks/FluentFTP
An FTP and FTPS client for .NET & .NET Standard, optimized for speed. Provides extensive FTP commands, File uploads/downloads, SSL/TLS connections, Automatic directory listing parsing, File hashing/checksums, File permissions/CHMOD, FTP proxies, FXP support, UTF-8 support, Async/await support, Powershell support and more. Written entirely in C#.
fanliang11/surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
Readarr/Readarr
Book Manager and Automation (Sonarr for Ebooks)
Nexus-Mods/NexusMods.App
Home of the development of the Nexus Mods App
Cysharp/ZLogger
Zero Allocation Text/Structured Logger for .NET with StringInterpolation and Source Generator, built on top of a Microsoft.Extensions.Logging.
geffzhang/NanoFabric
基于Consul + .NET Core + Polly + Ocelot + Exceptionless + IdentityServer等开源项目的微服务开发框架
vpnhood/VpnHood
Undetectable Fast Portable VPN
AddictedCS/soundfingerprinting
Open source audio fingerprinting in .NET. An efficient algorithm for acoustic fingerprinting written purely in C#.
CodeMazeBlog/CodeMazeGuides
The main repository for all the Code Maze guides
wabbajack-tools/wabbajack
An automated Modlist installer for various games.
Version Downloads Last updated
6.0.0-rc3 0 6/8/2025
6.0.0-rc2 589 6/2/2025
5.5.0 56,588 5/29/2025
5.4.0 2,707,734 2/2/2025
5.3.15 2,758,713 11/21/2024
5.3.14 1,835,463 9/23/2024
5.3.13 2,418,044 9/12/2024
5.3.12 1,755,806 8/12/2024
5.3.11 4,881,685 5/7/2024
5.3.10 320,883 4/30/2024
5.3.9 136,385 4/27/2024
5.3.8 7,793,083 12/29/2023
5.3.7 1,047,003 12/6/2023
5.3.5 3,129,251 10/15/2023
5.3.4 1,921,948 9/6/2023
5.3.3 1,359,580 8/5/2023
5.3.2 2,365,402 7/4/2023
5.3.1 117,909 7/1/2023
5.3.0 2,646,575 5/30/2023
5.2.5 330,137 5/25/2023
5.2.3 3,881,635 3/28/2023
5.2.2 2,992,507 2/17/2023
5.2.1 3,687,424 12/29/2022
5.2.0 2,119,359 11/27/2022
5.1.0 3,093,857 10/25/2022
5.0.4 3,725,693 9/1/2022
5.0.3 114,112 8/31/2022
5.0.2 963,880 8/12/2022
5.0.1 2,315,362 6/23/2022
5.0.0 4,520,900 5/17/2022
1.7.5 1,811,004 6/4/2022
1.7.4 18,851,306 8/25/2021
1.7.3 3,887,655 6/15/2021
1.7.2 9,244,091 3/26/2021
1.7.1 2,388,196 2/26/2021
1.7.0 3,712,130 12/29/2020
1.6.5 3,317,101 8/27/2020
1.6.4 8,914,162 5/20/2020
1.6.3 445,598 5/11/2020
1.6.2 7,855,240 3/16/2020
1.6.1 3,832,964 10/19/2019
1.6.0 7,656,882 10/7/2019
1.5.4 2,134,993 9/6/2019
1.5.3 291,789 8/28/2019
1.5.2 754,746 7/14/2019
1.5.1 2,963,261 6/5/2019
1.5.0 1,476,098 4/30/2019
1.4.0 5,246,754 1/16/2019
1.3.0 3,824,864 9/22/2018
1.2.1 1,196,230 8/5/2018
1.2.0 320,788 7/20/2018
1.1.0 648,225 5/25/2018
1.0.2 2,768,606 5/10/2018
1.0.1 825,657 4/7/2018
1.0.0 768,547 3/25/2018

ChangeLog:

- Updated to NLog v6.0-RC2
- Removed support for NetStandard 1.3 + 1.5
- Enabled nullable references
- Avoid boxing when extracting LogEvent properties from struct
- Reduce allocation when creating LogEvent with properties by using ReadOnlySpan
- Enabled <IsAotCompatible>

Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD

List of major changes in NLog 6.0: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.html