Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nlog/nlog.web
NLog integration for ASP.NET & ASP.NET Core 2-8
https://github.com/nlog/nlog.web
asp-net asp-net-core asp-net-core-mvc asp-net-mvc aspnet csharp dotnet logger logging logging-library net6 net8 netcore netstandard20 nlog
Last synced: 2 days ago
JSON representation
NLog integration for ASP.NET & ASP.NET Core 2-8
- Host: GitHub
- URL: https://github.com/nlog/nlog.web
- Owner: NLog
- License: bsd-3-clause
- Created: 2015-01-31T20:46:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T19:07:03.000Z (7 months ago)
- Last Synced: 2024-05-31T13:43:49.009Z (7 months ago)
- Topics: asp-net, asp-net-core, asp-net-core-mvc, asp-net-mvc, aspnet, csharp, dotnet, logger, logging, logging-library, net6, net8, netcore, netstandard20, nlog
- Language: C#
- Homepage: https://nlog-project.org
- Size: 3.77 MB
- Stars: 314
- Watchers: 23
- Forks: 168
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.MD
- License: LICENSE
Awesome Lists containing this project
README
![NLog](https://raw.githubusercontent.com/NLog/NLog.github.io/master/images/NLog-logo-only_small.png)
# NLog.Web (ASP.NET & ASP.NET Core)
| Nuget-package | Description | Supported Platforms |
|:----------------|:-------------|:--------------------|
| [![NuGet Release](https://img.shields.io/nuget/v/NLog.Web.AspNetCore.svg?label=NLog.Web.AspNetCore)](https://www.nuget.org/packages/NLog.Web.AspNetCore) | ASP.NET applications for new .NET Core platforms | .NET 5, 6, 7, 8 and 9 |
| [![NuGet Release](https://img.shields.io/nuget/v/NLog.Web.svg?label=NLog.Web)](https://www.nuget.org/packages/NLog.Web) | Classic ASP.NET MVC applications for .NET Framework | .NET Framework 3.5 - 4.8 |[![Build status](https://img.shields.io/appveyor/ci/nlog/nlog-web/master.svg)](https://ci.appveyor.com/project/nlog/nlog-web/branch/master)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=ncloc)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=bugs)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=vulnerabilities)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=code_smells)](https://sonarcloud.io/project/issues?id=nlog.web&branch=master&resolved=false&types=CODE_SMELL)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=sqale_debt_ratio)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=coverage)](https://sonarcloud.io/component_measures?id=nlog.web&branch=master&metric=coverage)These packages are extensions to [NLog](https://github.com/NLog/NLog/), and provides targets and layout-renderes specific to ASP.NET (Core), MVC and IIS.
## Releases
For updates and releases, check [CHANGELOG.MD](CHANGELOG.MD) or [Releases](https://github.com/NLog/NLog.Web/releases)
## ASP.NET Core
The [NLog.Web.AspNetCore](https://www.nuget.org/packages/NLog.Web.AspNetCore)-package works with the new ASP.NET Core platforms .NET 5, 6, 7, 8 and 9- [Getting started for ASP.NET Core 6](https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-6)
- [Getting started for ASP.NET Core 5](https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5)
- [Getting started for ASP.NET Core 3.1](https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-3)
- [Supported layout renderers for ASP.NET Core](https://nlog-project.org/config/?tab=layout-renderers&search=package:nlog.web.aspnetcore)
- [Getting started for .NET Core Console application](https://github.com/NLog/NLog/wiki/Getting-started-with-.NET-Core-2---Console-application)
- [How to use structured logging](https://github.com/NLog/NLog/wiki/How-to-use-structured-logging)
- [Blog posts for how to get started with ASP.NET Core and NLog](https://github.com/damienbod/AspNetCoreNlog)## ASP.NET (non-core)
The [NLog.Web](https://www.nuget.org/packages/NLog.Web)-package works with classic ASP.NET MVC with .NET Framework 3.5 - 4.8
- [Supported targets for ASP.NET](https://nlog-project.org/config/?tab=targets&search=package:nlog.web)
- [Supported layout renderers for ASP.NET](https://nlog-project.org/config/?tab=layout-renderers&search=package:nlog.web)NLog 5.0 requires that NLog.config must include NLog.Web in extensions:
```xml
```## HTTP module (ASP.NET non-core)
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:
```xml
```
## 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