NLog.Web.AspNetCore 5.2.2

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:

  • For ASP.NET Core 6, .NET 6
  • For ASP.NET Core 5, .NET 5
  • For ASP.NET Core 3, .NET Core 3.1
  • For 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: - AspNetQueryStringLayoutRenderer - Added Exclude-option for consistency (#917) (@snakefoot) - AspNetRequestFormLayoutRenderer - Added Items-option for consistency (#918) (@snakefoot) - AspNet Response HttpStatusCode LayoutRenderer as Enum.ToString (#921) (@bakgerman) - AspNet Request-Ip with support for CheckForwardedForHeaderOffset (#923) (@bakgerman) - AspNetBufferingTargetWrapper - BufferGrowLimit cealing BufferSize (#924) (@snakefoot) - Updated dependency NLog.Extensions.Logging v5.2.2 (#927) (@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

Version Downloads Last updated
5.4.0 3 02/15/2025
5.3.15 6 12/02/2024
5.3.14 6 10/02/2024
5.3.13 7 09/13/2024
5.3.12 8 08/18/2024
5.3.11 27 05/09/2024
5.3.10 26 05/02/2024
5.3.9 12 04/29/2024
5.3.8 13 01/22/2024
5.3.7 11 01/23/2024
5.3.5 11 01/22/2024
5.3.4 13 01/22/2024
5.3.3 16 01/22/2024
5.3.2 15 01/22/2024
5.3.1 12 01/22/2024
5.3.0 13 01/23/2024
5.2.3 13 01/23/2024
5.2.2 12 01/22/2024
5.2.1 12 03/02/2023
5.2.0 12 01/22/2024
5.1.5 12 01/22/2024
5.1.4 12 01/22/2024
5.1.2 11 01/22/2024
5.1.1 12 01/23/2024
5.1.0 12 01/23/2024
5.0.0 14 01/22/2024
4.15.0 11 01/22/2024
4.14.0 12 01/22/2024
4.13.0 11 01/29/2024
4.13.0-readme-preview 11 01/22/2024
4.12.0 12 01/23/2024
4.11.0 13 01/22/2024
4.10.0 10 01/23/2024
4.9.3 10 01/23/2024
4.9.2 14 01/22/2024
4.9.1 12 01/29/2024
4.9.0 14 01/23/2024
4.8.6 12 01/23/2024
4.8.5 14 01/23/2024
4.8.4 10 01/24/2024
4.8.3 16 01/22/2024
4.8.2 15 01/22/2024
4.8.1 11 01/24/2024
4.8.0 14 01/24/2024
4.7.1 13 01/22/2024
4.7.0 13 01/22/2024
4.6.0 12 01/22/2024
4.5.4 12 01/24/2024
4.5.3 12 01/23/2024
4.5.2 12 01/22/2024
4.5.1 17 01/23/2024
4.5.0 13 01/22/2024
4.4.1 9 01/23/2024
4.4.0 10 01/29/2024
4.3.1 14 01/22/2024
4.3.0 13 01/22/2024
4.2.4 15 01/29/2024
4.2.3 11 01/22/2024