Skip to content
forked from NLog/NLog.Web

NLog integration for ASP.NET & ASP.NET Core 2-6

License

Notifications You must be signed in to change notification settings

czd890/NLog.Web

 
 

Repository files navigation

NLog

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

NuGet Release

NuGet Release

Build status

These packages are extensions to NLog.

The packages contain targets and layout-renderes specific to ASP.NET (Core), MVC and IIS.

Getting started with NLog

Config

Troubleshooting

Releases

For updates and releases, check CHANGELOG.MD or Releases

ASP.NET Core

The NLog.Web.AspNetCore-package supports the platforms:

  • For ASP.NET Core 6, .NET 6
  • For ASP.NET Core 5, .NET 5
  • For ASP.NET Core 3, .NET Core 3.0
  • For ASP.NET Core 2, .NET Standard 2.0+ and .NET 4.6+

ℹ️ Missing the trace and debug logs? Check your appsettings.json

Use the NLog.Web.AspNetCore package

ASP.NET (non-core)

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

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

HTTP module (ASP.NET non-core)

note: not listed on https://nlog-project.org/config

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

About

NLog integration for ASP.NET & ASP.NET Core 2-6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.7%
  • PowerShell 0.3%