Giter VIP home page Giter VIP logo

nlog.web's Introduction

NLog

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.

  • Version (ASP.NET Core 1+2)
  • Version (ASP.NET)

Getting started

Updates

For updates and releases, check CHANGELOG.MD or Releases

ASP.NET Core 1 / ASP.NET Core 2

ℹī¸ Missing the trace and debug logs in .NET Core 2? Check your appsettings.json

Use the NLog.Web.AspNetCore package

There is a special package for ASP.NET Core / MVC Core. This is needed because we can't detect if ASP.NET or ASP.NET Core is used. The package depends on NLog.Extensions.Logging - which integrates with the ASP.NET Core logging system.

Installation

Include in your nlog.config:

<!-- enable asp.net core layout renderers -->
<extensions>
  <add assembly="NLog.Web.AspNetCore"/>
</extensions>

ASP.NET (non-core)

Use the NLog.Web package.

Installation

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

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>

License

BSD

nlog.web's People

Contributors

304notmodified avatar abakumov-v avatar alexangas avatar blaikic avatar dafanasiev avatar damienbod avatar defee avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar drewbrasher avatar epignosisx avatar giorgi avatar grokky1 avatar johnkors avatar kichristensen avatar mcliment avatar page-not-found avatar petemounce avatar repo-ranger[bot] avatar s-sreenath avatar snakefoot avatar timabell avatar vegar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.