NLog.Web.AspNetCore 6.0.0-rc4

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 6, 7, 8 and 9
  • 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: - Updated dependency NLog v6.0 RC4 - Removed support for .NET Core 3.1 + .NET v5 - Enabled nullable references - Enabled <IsAotCompatible> - Removed obsolete extension-methods to register NLog as Logging Provider. - Removed support for EvaluateAsNestedProperties, instead use ObjectPath. - Renamed class-names for old LayoutRenderers to follow standards (@bakgerman) - Marked AspNetLayoutRendererBase DoAppend-method as obsolete (@bakgerman) - Introduced NLogBufferingTargetWrapperModule to replace NLogHttpModule (@bakgerman) - Added ${host-environment} as alias for ${aspnet-environment} - Added ${host-rootdir} as alias for ${aspnet-aspbasepath} - Added ${host-appname} as alias for ${iis-site-name} 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

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