304NotModified / NLog.Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

AppVeyor codecov.io BCH compliance

These packages are extensions to NLog.

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

ASP.NET: Version Rager Releases

ASP.NET Core: Version Rager Releases (ASP.NET Core 2 - install latest beta)

Getting started

Updates

For updates and releases, check CHANGELOG.MD or Releases

ASP.NET (non-core)

Simply install the package. NLog will detect the extension automatically.

ASP.NET Core 1 / ASP.NET Core 2


ℹ️ Missing the trace en debug logs in .NET Core 2? Set ILoggingBuilder.SetMinimumLevel()


⚠️ Not all targets and layout renders are implemented for .NET Standard. See the Platform support table


There is a special package for ASP.NET Core / MVC Core. This is needed because HttpContext.Current isn't available in ASP.NET Core and we can't detect if ASP.NET or ASP.NET Core is used. The package depends on NLog.Extensions.Logging

The following parts are supported in ASP.NET Core:

Introduced in NLog.Web 4.3 & NLog.Web.AspNetCore 4.3

Introduced in NLog.Web.AspNetCore 4.3.1

Content

This package contains one target, one target-wrapper, multiple layout renderers and one httpmodule.

Targets

  • AspNetTrace
  • AspNetBufferingWrapper

See Target documentation at the NLog wiki

Layout renderers

See Layout renderers documentation at the NLog wiki

Configuration

For the targets and layout renderers, no additional configuration is needed.

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>

License

BSD

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C# 99.2%Language:Batchfile 0.6%Language:PowerShell 0.2%