NLog.Web
Version 5.3.15
| Nuget包裝 | 描述 | 支持的平台 |
|---|---|---|
| 新.NET核心平台的ASP.NET應用程序 | .NET 5、6、7、8和9 | |
| .NET框架的經典ASP.NET MVC應用程序 | .NET框架3.5-4.8 |
這些軟件包是對NLOG的擴展,並提供了針對ASP.NET(CORE),MVC和IIS的目標和佈局渲染。
有關更新和發行版,請查看ChangElog.md或版本
NLOG.WEB.ASPNETCORE包裝與新的ASP.NET核心平台.NET 5、6、7、8和9合作
nlog.web包裝與.NET框架3.5-4.8一起使用經典的ASP.NET MVC
nlog 5.0要求nlog.config必須在擴展中包含nlog.web:
<!-- enable ASP.NET layout renderers -->
< extensions >
< add assembly = " NLog.Web " />
</ extensions >有一個ASP.NET ASP.NET HTTPMODULE,它使NLOG可以輕鬆地掛接和EndRequest事件。
NLogHttpModule需要在web.config中註冊:
< system .webServer>
< modules runAllManagedModulesForAllRequests = " true " >
< add name = " NLog " type = " NLog.Web.NLogHttpModule, NLog.Web " />
</ modules >
</ system .webServer>高度讚賞貢獻!如果可能的話,請確保是否適用於ASP.NET和ASP.NET Core,並確保由單元測試覆蓋。
BSD