NLog.Web.AspNetCore
5.2.1
dotnet add package NLog.Web.AspNetCore --version 5.2.1
NuGet\Install-Package NLog.Web.AspNetCore -Version 5.2.1
<PackageReference Include="NLog.Web.AspNetCore" Version="5.2.1" />
paket add NLog.Web.AspNetCore --version 5.2.1
#r "nuget: NLog.Web.AspNetCore, 5.2.1"
// Install NLog.Web.AspNetCore as a Cake Addin
#addin nuget:?package=NLog.Web.AspNetCore&version=5.2.1
// Install NLog.Web.AspNetCore as a Cake Tool
#tool nuget:?package=NLog.Web.AspNetCore&version=5.2.1
NLog.Web.AspNetCore
Integrates NLog as Logging provider for the ASP.NET Core platform, by just calling UseNLog()
with the application host-builder.
Providing features like:
- Enrich logging output with additional details from active HttpContext using NLog LayoutRenderers, by just updating the NLog configuration.
- Supports middleware injection for HTTP Request Logging and HTTP Response Logging.
- Routing logging output to multiple destinations via the available NLog Targets
- Rendering logging output into standard formats like JSON, CVS, W3C ELF and XML using NLog Layouts.
- Contributions are always welcome, by creating a pull request.
Supported platforms:
- For ASP.NET Core 6, .NET 6
- For ASP.NET Core 5, .NET 5
- For ASP.NET Core 3, .NET Core 3.1
- For ASP.NET Core 2, .NET Standard 2.0 and .NET 4.6.1+
Registration of NLog.Web.AspNetCore in the NLog.config file:
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
Registration of NLog.Web.AspNetCore can also be performed with fluent setup:
NLog.LogManager.Setup().LoadConfigurationFromAppSettings();
Useful Links
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETCoreApp 3.1
- NLog.Extensions.Logging (>= 5.2.1)
-
.NETFramework 4.6.1
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.1.1)
- Microsoft.AspNetCore.Http (>= 2.1.22)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.1.1)
- NLog.Extensions.Logging (>= 5.2.1)
- System.Text.Encodings.Web (>= 4.5.1)
-
.NETStandard 2.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.1.1)
- Microsoft.AspNetCore.Http (>= 2.1.22)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.1.1)
- NLog.Extensions.Logging (>= 5.2.1)
- System.Text.Encodings.Web (>= 4.5.1)
-
net5.0
- NLog.Extensions.Logging (>= 5.2.1)
-
net6.0
- NLog.Extensions.Logging (>= 5.2.1)
NuGet packages (317)
Showing the top 5 NuGet packages that depend on NLog.Web.AspNetCore:
Package | Downloads |
---|---|
Ccf.Ck.Libs.Logging
Extends the default nlog library with static methods for logging and default visualization of the logged entries |
|
Coder.Extension
Coder扩展程序,包含:AutoMapper,Log,CsRedis,Swagger(Knife4j),Cors,Autofac,Hangfire,TimedJob,CAP,SqlSugar,Polly(超时,重试,熔断,降级)等扩展服务和中间件。 |
|
GreatUtilities.Infrastructure
Essencial tools to agile development. |
|
NapaGroupLLC.NapaBase
A base to create services |
|
OrchardCore.Logging.NLog
Orchard Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Provides NLog logging for application. |
GitHub repositories (56)
Showing the top 5 popular GitHub repositories that depend on NLog.Web.AspNetCore:
Repository | Stars |
---|---|
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
|
|
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
|
|
Jackett/Jackett
API Support for your favorite torrent trackers
|
|
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
|
|
NLog/NLog
NLog - Advanced and Structured Logging for Various .NET Platforms
|
Version | Downloads | Last updated |
---|---|---|
5.2.1 | 205,428 | 12/30/2022 |
5.2.0 | 268,319 | 11/27/2022 |
5.1.5 | 419,647 | 10/25/2022 |
5.1.4 | 824,534 | 9/1/2022 |
5.1.2 | 28,458 | 9/1/2022 |
5.1.1 | 197,595 | 8/17/2022 |
5.1.0 | 529,847 | 7/18/2022 |
5.0.0 | 1,109,936 | 5/17/2022 |
4.15.0 | 241,263 | 6/4/2022 |
4.14.0 | 6,247,920 | 8/28/2021 |
4.13.0 | 1,330,073 | 7/14/2021 |
4.13.0-readme-preview | 29,160 | 5/3/2021 |
4.12.0 | 3,791,320 | 3/29/2021 |
4.11.0 | 1,115,614 | 2/27/2021 |
4.10.0 | 1,944,898 | 12/30/2020 |
4.9.3 | 4,807,030 | 8/1/2020 |
4.9.2 | 4,423,859 | 4/20/2020 |
4.9.1 | 968,395 | 3/30/2020 |
4.9.0 | 6,764,030 | 10/11/2019 |
4.8.6 | 328,443 | 9/30/2019 |
4.8.5 | 895,848 | 9/7/2019 |
4.8.4 | 1,543,208 | 7/2/2019 |
4.8.3 | 628,805 | 6/5/2019 |
4.8.2 | 926,129 | 5/6/2019 |
4.8.1 | 1,353,274 | 3/18/2019 |
4.8.0 | 1,723,879 | 1/25/2019 |
4.7.1 | 444,242 | 1/6/2019 |
4.7.0 | 2,027,870 | 9/22/2018 |
4.6.0 | 810,308 | 8/5/2018 |
4.5.4 | 1,862,435 | 5/10/2018 |
4.5.3 | 119,460 | 4/29/2018 |
4.5.2 | 285,175 | 4/12/2018 |
4.5.1 | 187,080 | 4/2/2018 |
4.5.0 | 75,634 | 3/27/2018 |
4.4.1 | 979,433 | 6/16/2017 |
4.4.0 | 78,903 | 5/14/2017 |
4.3.1 | 184,844 | 2/10/2017 |
4.3.0 | 38,078 | 1/18/2017 |
4.2.4 | 17,775 | 7/3/2016 |
4.2.3 | 40,095 | 5/24/2016 |
- Introduced NLogBufferingTargetWrapperMiddleware to support AspNetBufferingWrapper (#900) (@bakgerman)
- Created README.md for the NLog.Web.AspNetCore nuget-package (#898) (@bakgerman)
- Added common Items-property for LayoutRenderers that can output multiple values. Ex Headers/Cookies (#904) (@snakefoot)
- Updated dependency NLog.Extensions.Logging v5.2.1 (#915) (@snakefoot)
List of major changes in NLog 5.0: https://nlog-project.org/2022/05/16/nlog-5-0-finally-ready.html
Full changelog: https://github.com/NLog/NLog.Web/releases
List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-renderers&search=package:nlog.web.aspnetcore