Skip to content

NLog/NLog.Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 2, 2025
1a84e4c · Feb 2, 2025
May 25, 2024
Feb 2, 2025
Feb 2, 2025
Feb 2, 2025
Jan 5, 2016
May 23, 2016
Feb 2, 2025
May 30, 2020
Jul 11, 2023
Sep 18, 2019
Aug 31, 2015
Feb 2, 2025
Feb 2, 2025
Jul 17, 2024
Feb 2, 2025
Sep 29, 2017

Repository files navigation

NLog

NLog.Web (ASP.NET & ASP.NET Core)

Nuget-package Description Supported Platforms
NuGet Release ASP.NET applications for new .NET Core platforms .NET 5, 6, 7, 8 and 9
NuGet Release Classic ASP.NET MVC applications for .NET Framework .NET Framework 3.5 - 4.8

Build status

These packages are extensions to NLog, and provides targets and layout-renderes specific to ASP.NET (Core), MVC and IIS.

Releases

For updates and releases, check CHANGELOG.MD or Releases

ASP.NET Core

The NLog.Web.AspNetCore-package works with the new ASP.NET Core platforms .NET 5, 6, 7, 8 and 9

ASP.NET (non-core)

The NLog.Web-package works with classic ASP.NET MVC with .NET Framework 3.5 - 4.8

NLog 5.0 requires that NLog.config must include NLog.Web in extensions:

  <!-- enable ASP.NET layout renderers -->
  <extensions>
    <add assembly="NLog.Web"/>
  </extensions>

HTTP module (ASP.NET non-core)

There is a ASP.NET ASP.NET HttpModule that enables NLog to hook BeginRequest and EndRequest events easily.

The NLogHttpModule needs a registration in the web.config:

<system.webServer> 
	<modules runAllManagedModulesForAllRequests="true"> 
		<add name="NLog" type="NLog.Web.NLogHttpModule, NLog.Web" />
	</modules>
</system.webServer>

Contributions

Contributions are highly appreciated! Please make sure if works for ASP.NET and ASP.NET Core if possible and make sure it is covered by unit tests.

License

BSD