NLog.Web.AspNetCore 5.4.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.
- 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 5, 6, 7 and 8
- ASP.NET Core 3.1
- ASP.NET Core 2, .NET Standard 2.0 and .NET 4.6.1+
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:
No packages depend on NLog.Web.AspNetCore.
ChangeLog:
- AspNetUserClaimLayoutRenderer - Extended with Azure Claims ObjectId + TenantId + AppId (#1069) (@snakefoot)
- Micro optimization by using is null (#1070) (@snakefoot)
- Updated dependency NLog.Extensions.Logging v5.4 (#1072) (@snakefoot)List of major changes in NLog 5.0: https://nlog-project.org/2022/05/16/nlog-5-0-finally-ready.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
.NET Framework 4.6.1
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.1.1)
- Microsoft.AspNetCore.Http (>= 2.1.22)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.1.1)
- NLog.Extensions.Logging (>= 5.4.0)
- System.Text.Encodings.Web (>= 4.5.1)
.NET Core 3.1
- NLog.Extensions.Logging (>= 5.4.0)
.NET 5.0
- NLog.Extensions.Logging (>= 5.4.0)
.NET 6.0
- NLog.Extensions.Logging (>= 5.4.0)
.NET 8.0
- NLog.Extensions.Logging (>= 5.4.0)
.NET Standard 2.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.1.1)
- Microsoft.AspNetCore.Http (>= 2.1.22)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.1.1)
- NLog.Extensions.Logging (>= 5.4.0)
- System.Text.Encodings.Web (>= 4.5.1)
| Version | Downloads | Last updated |
|---|---|---|
| 6.1.0 | 0 | 2025-11-12 |
| 6.0.6 | 0 | 2025-11-09 |
| 6.0.5 | 0 | 2025-10-09 |
| 6.0.4 | 0 | 2025-09-11 |
| 6.0.3 | 0 | 2025-08-10 |
| 6.0.2 | 0 | 2025-07-20 |
| 6.0.1 | 0 | 2025-06-28 |
| 6.0.0 | 0 | 2025-06-21 |
| 5.5.0 | 0 | 2025-05-29 |
| 5.4.0 | 146 | 2025-04-16 |
| 5.3.15 | 0 | 2024-11-21 |
| 5.3.14 | 0 | 2024-09-23 |
| 5.3.13 | 0 | 2024-09-12 |
| 5.3.12 | 382 | 2025-04-11 |
| 5.3.11 | 0 | 2024-05-07 |
| 5.3.10 | 0 | 2024-04-30 |
| 5.3.9 | 0 | 2024-04-27 |
| 5.3.8 | 0 | 2023-12-29 |
| 5.3.7 | 0 | 2023-12-06 |
| 5.3.5 | 0 | 2023-10-15 |
| 5.3.4 | 0 | 2023-09-06 |
| 5.3.3 | 0 | 2023-08-06 |
| 5.3.2 | 0 | 2023-07-04 |
| 5.3.1 | 0 | 2023-07-01 |
| 5.3.0 | 0 | 2023-05-30 |
| 5.2.3 | 0 | 2023-03-28 |
| 5.2.2 | 0 | 2023-02-17 |
| 5.2.1 | 0 | 2022-12-30 |
| 5.2.0 | 0 | 2022-11-27 |
| 5.1.5 | 0 | 2022-10-25 |
| 5.1.4 | 0 | 2022-09-01 |
| 5.1.2 | 0 | 2022-09-01 |
| 5.1.1 | 0 | 2022-08-17 |
| 5.1.0 | 0 | 2022-07-18 |
| 5.0.0 | 0 | 2022-05-17 |
| 4.15.0 | 0 | 2022-06-04 |
| 4.14.0 | 0 | 2021-08-28 |
| 4.13.0 | 0 | 2021-07-14 |
| 4.13.0-readme-preview | 0 | 2021-05-03 |
| 4.12.0 | 0 | 2021-03-29 |
| 4.11.0 | 0 | 2021-02-27 |
| 4.10.0 | 0 | 2020-12-30 |
| 4.9.3 | 0 | 2020-08-01 |
| 4.9.2 | 0 | 2020-04-20 |
| 4.9.1 | 0 | 2020-03-30 |
| 4.9.0 | 0 | 2019-10-11 |
| 4.8.6 | 0 | 2019-09-30 |
| 4.8.5 | 0 | 2019-09-07 |
| 4.8.4 | 0 | 2019-07-02 |
| 4.8.3 | 0 | 2019-06-05 |
| 4.8.2 | 0 | 2019-05-06 |
| 4.8.1 | 0 | 2019-03-18 |
| 4.8.0 | 0 | 2019-01-25 |
| 4.7.1 | 0 | 2019-01-06 |
| 4.7.0 | 0 | 2018-09-22 |
| 4.6.0 | 0 | 2018-08-05 |
| 4.5.4 | 0 | 2018-05-10 |
| 4.5.3 | 0 | 2018-04-29 |
| 4.5.2 | 0 | 2018-04-12 |
| 4.5.1 | 0 | 2018-04-02 |
| 4.5.0 | 0 | 2018-03-27 |
| 4.4.1 | 0 | 2017-06-16 |
| 4.4.0 | 0 | 2017-05-14 |
| 4.3.1 | 0 | 2017-02-10 |
| 4.3.0 | 0 | 2017-01-18 |
| 4.2.4 | 0 | 2016-07-03 |
| 4.2.3 | 0 | 2016-05-24 |