Skip to main content
NLog.Web.AspNetCore package icon

NLog.Web.AspNetCore

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

Total Downloads
173.5M
173,523,168
Published
Aug 6, 2023
Latest stable version

Install

.NET CLI
dotnet add package NLog.Web.AspNetCore --version 5.3.3
Package Manager Console
Install-Package NLog.Web.AspNetCore -Version 5.3.3
PackageReference
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.3" />

Frameworks

.NETFramework4.6.1 .NETCoreApp3.1 net5.0 net6.0 .NETStandard2.0

Dependencies

[2.1.1, )
Microsoft.AspNetCore.Http
.NETFramework4.6.1
[2.1.22, )
[2.1.1, )
NLog.Extensions.Logging
.NETFramework4.6.1
[5.3.3, )
System.Text.Encodings.Web
.NETFramework4.6.1
[4.5.1, )
[5.3.3, )
[5.3.3, )
[5.3.3, )
[2.1.22, )
[5.3.3, )
[4.5.1, )

Adoption guide

Teams already using NLog or requiring its configuration-oriented routing model.

Logging guide
Why it appears in the guide: NLog integration for ASP.NET Core with flexible target and rule configuration. Trade-off: Avoid adding a second logging pipeline when the existing provider already meets the requirement.

Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.

The published metadata declares 13 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.