NLog.Web.AspNetCore
6.1.0
Prefix Reserved
dotnet add package NLog.Web.AspNetCore --version 6.1.0
NuGet\Install-Package NLog.Web.AspNetCore -Version 6.1.0
<PackageReference Include="NLog.Web.AspNetCore" Version="6.1.0" />
<PackageVersion Include="NLog.Web.AspNetCore" Version="6.1.0" />
<PackageReference Include="NLog.Web.AspNetCore" />
paket add NLog.Web.AspNetCore --version 6.1.0
#r "nuget: NLog.Web.AspNetCore, 6.1.0"
#:package NLog.Web.AspNetCore@6.1.0
#addin nuget:?package=NLog.Web.AspNetCore&version=6.1.0
#tool nuget:?package=NLog.Web.AspNetCore&version=6.1.0
NLog.Web.AspNetCore
Integrates NLog as Logging provider for the ASP.NET Core platform, by just calling UseNLog() with the application host-builder.
Providing features like:
- Enrich logging output with additional details from active HttpContext using NLog LayoutRenderers, by just updating the NLog configuration.
- Supports middleware injection for HTTP Request Logging and HTTP Response Logging.
- Load NLog configuration from appsettings.json
- Capture structured message properties from the Microsoft ILogger
- Capture scope context properties from the Microsoft ILogger
BeginScope - Routing logging output to multiple destinations via the available NLog Targets
- Rendering logging output into standard formats like JSON, CVS, W3C ELF and XML using NLog Layouts.
- Contributions are always welcome, by creating a pull request.
Supported platforms:
- ASP.NET Core 6, 7, 8, 9 and 10
- ASP.NET Core 2, .NET Standard 2.0 and .NET 4.6.2+
Registration of NLog.Web.AspNetCore in the NLog.config file:
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
Registration of NLog.Web.AspNetCore can also be performed with fluent setup:
NLog.LogManager.Setup().LoadConfigurationFromAppSettings();
Useful Links:
| Product | Versions 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 is compatible. 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 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. 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. |
-
.NETFramework 4.6.2
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.3.0)
- NLog.Extensions.Logging (>= 6.1.0)
-
.NETStandard 2.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.3.0)
- NLog.Extensions.Logging (>= 6.1.0)
-
net10.0
- NLog.Extensions.Logging (>= 6.1.0)
-
net6.0
- NLog.Extensions.Logging (>= 6.1.0)
-
net8.0
- NLog.Extensions.Logging (>= 6.1.0)
NuGet packages (468)
Showing the top 5 NuGet packages that depend on NLog.Web.AspNetCore:
| Package | Downloads |
|---|---|
|
Coder.Extension
Coder扩展程序,包含:AutoMapper,Log,CsRedis,Swagger(Knife4j),Cors,Autofac,Hangfire,TimedJob,CAP,SqlSugar,Polly(超时,重试,熔断,降级)等扩展服务和中间件。 |
|
|
Ccf.Ck.Libs.Logging
Extends the default nlog library with static methods for logging and default visualization of the logged entries |
|
|
OrchardCore.Logging.NLog
Orchard Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Provides NLog logging for application. |
|
|
Solhigson.Framework
Utility Library |
|
|
EachShow.Host
主机启动程序 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.1.0 | 48,815 | 11/12/2025 |
| 6.0.6 | 39,886 | 11/9/2025 |
| 6.0.5 | 299,221 | 10/9/2025 |
| 6.0.4 | 331,335 | 9/11/2025 |
| 6.0.3 | 450,432 | 8/10/2025 |
| 6.0.2 | 262,922 | 7/20/2025 |
| 6.0.1 | 328,147 | 6/28/2025 |
| 6.0.0 | 117,497 | 6/21/2025 |
| 5.5.0 | 1,077,398 | 5/29/2025 |
| 5.4.0 | 5,270,935 | 2/2/2025 |
| 5.3.15 | 3,211,175 | 11/21/2024 |
| 5.3.14 | 3,437,097 | 9/23/2024 |
| 5.3.13 | 395,144 | 9/12/2024 |
| 5.3.12 | 1,889,132 | 8/12/2024 |
| 5.3.11 | 4,830,437 | 5/7/2024 |
| 5.3.10 | 273,805 | 4/30/2024 |
| 5.3.9 | 139,130 | 4/27/2024 |
| 5.3.8 | 6,287,545 | 12/29/2023 |
| 5.3.7 | 885,925 | 12/6/2023 |
| 5.3.5 | 2,897,641 | 10/15/2023 |
| 5.3.4 | 1,501,067 | 9/6/2023 |
| 5.3.3 | 1,133,053 | 8/6/2023 |
| 5.3.2 | 1,961,160 | 7/4/2023 |
| 5.3.1 | 76,221 | 7/1/2023 |
| 5.3.0 | 2,083,052 | 5/30/2023 |
| 5.2.3 | 3,574,485 | 3/28/2023 |
| 5.2.2 | 2,316,489 | 2/17/2023 |
| 5.2.1 | 2,801,145 | 12/30/2022 |
| 5.2.0 | 1,765,784 | 11/27/2022 |
| 5.1.5 | 2,689,270 | 10/25/2022 |
| 5.1.4 | 2,933,104 | 9/1/2022 |
| 5.1.2 | 109,416 | 9/1/2022 |
| 5.1.1 | 599,120 | 8/17/2022 |
| 5.1.0 | 1,551,734 | 7/18/2022 |
| 5.0.0 | 4,607,220 | 5/17/2022 |
| 4.15.0 | 1,595,740 | 6/4/2022 |
| 4.14.0 | 14,696,742 | 8/28/2021 |
| 4.13.0 | 2,449,357 | 7/14/2021 |
| 4.13.0-readme-preview | 43,393 | 5/3/2021 |
| 4.12.0 | 5,853,217 | 3/29/2021 |
| 4.11.0 | 1,791,523 | 2/27/2021 |
| 4.10.0 | 2,767,166 | 12/30/2020 |
| 4.9.3 | 7,285,281 | 8/1/2020 |
| 4.9.2 | 6,106,824 | 4/20/2020 |
| 4.9.1 | 1,299,725 | 3/30/2020 |
| 4.9.0 | 8,605,946 | 10/11/2019 |
| 4.8.6 | 462,839 | 9/30/2019 |
| 4.8.5 | 1,318,136 | 9/7/2019 |
| 4.8.4 | 1,855,845 | 7/2/2019 |
| 4.8.3 | 732,021 | 6/5/2019 |
| 4.8.2 | 1,373,042 | 5/6/2019 |
| 4.8.1 | 1,711,410 | 3/18/2019 |
| 4.8.0 | 2,364,920 | 1/25/2019 |
| 4.7.1 | 725,878 | 1/6/2019 |
| 4.7.0 | 2,401,641 | 9/22/2018 |
| 4.6.0 | 932,073 | 8/5/2018 |
| 4.5.4 | 2,683,302 | 5/10/2018 |
| 4.5.3 | 145,666 | 4/29/2018 |
| 4.5.2 | 358,217 | 4/12/2018 |
| 4.5.1 | 214,039 | 4/2/2018 |
| 4.5.0 | 105,776 | 3/27/2018 |
| 4.4.1 | 1,103,299 | 6/16/2017 |
| 4.4.0 | 100,560 | 5/14/2017 |
| 4.3.1 | 234,980 | 2/10/2017 |
| 4.3.0 | 43,348 | 1/18/2017 |
| 4.2.4 | 22,368 | 7/3/2016 |
| 4.2.3 | 151,733 | 5/24/2016 |
ChangeLog:
- [#1110] Added NET10 targetframework (@snakefoot)
- [#1110] aspnet-request-tls-handshake supporting NegotiatedCipherSuite + HostName (@snakefoot)
List of major changes in NLog v6.0: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.html
Full changelog: https://github.com/NLog/NLog.Web/releases
List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-renderers&search=package:nlog.web.aspnetcore