Skip to content
forked from NLog/NLog.Web

NLog targets specific for Web: ASP.NET & ASP.NET Core

License

Notifications You must be signed in to change notification settings

jikkujj/NLog.Web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

ASP.NET Core: Version (ASP.NET Core 2 - install 4.5.x)

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

NLog targets specific for Web: ASP.NET & ASP.NET Core

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.3%
  • Other 0.7%