NLog.Web.AspNetCore
6.2.2
Prefix Reserved
dotnet add package NLog.Web.AspNetCore --version 6.2.2
NuGet\Install-Package NLog.Web.AspNetCore -Version 6.2.2
<PackageReference Include="NLog.Web.AspNetCore" Version="6.2.2" />
<PackageVersion Include="NLog.Web.AspNetCore" Version="6.2.2" />
<PackageReference Include="NLog.Web.AspNetCore" />
paket add NLog.Web.AspNetCore --version 6.2.2
#r "nuget: NLog.Web.AspNetCore, 6.2.2"
#:package NLog.Web.AspNetCore@6.2.2
#addin nuget:?package=NLog.Web.AspNetCore&version=6.2.2
#tool nuget:?package=NLog.Web.AspNetCore&version=6.2.2
NLog.Web.AspNetCore
NLog.Web.AspNetCore integrates NLog as a logging provider for Microsoft.Extensions.Logging by calling UseNLog() on the application HostBuilder.
Application code can continue using ILogger<T>, while NLog provides powerful logging capabilities including:
- 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.
- Load NLog configuration from appsettings.json
- Capture structured message properties from the Microsoft ILogger
- Capture scope context properties from the Microsoft ILogger
BeginScope - 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:
- ASP.NET Core 6, 7, 8, 9 and 10
- ASP.NET Core 2, .NET Standard 2.0 and .NET 4.6.2+
Register NLog as logging provider:
builder.Logging.ClearProviders();
builder.Host.UseNLog();
If logging is needed before the host building, then one can use fluent setup:
var logger = NLog.LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
Useful Links:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.3.0)
- NLog.Extensions.Logging (>= 6.2.2)
-
.NETStandard 2.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.3.0)
- NLog.Extensions.Logging (>= 6.2.2)
-
net10.0
- NLog.Extensions.Logging (>= 6.2.2)
-
net6.0
- NLog.Extensions.Logging (>= 6.2.2)
-
net8.0
- NLog.Extensions.Logging (>= 6.2.2)
NuGet packages (509)
Showing the top 5 NuGet packages that depend on NLog.Web.AspNetCore:
| Package | Downloads |
|---|---|
|
Coder.Extension
Coder扩展程序,包含:AutoMapper,Log,CsRedis,Swagger(Knife4j),Cors,Autofac,Hangfire,TimedJob,CAP,SqlSugar,Polly(超时,重试,熔断,降级)等扩展服务和中间件。 |
|
|
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. |
|
|
Ccf.Ck.Libs.Logging
Extends the default nlog library with static methods for logging and default visualization of the logged entries |
|
|
Solhigson.Framework
Utility Library |
|
|
EachShow.Host
主机启动程序 |
GitHub repositories (66)
Showing the top 20 popular GitHub repositories that depend on NLog.Web.AspNetCore:
| Repository | Stars |
|---|---|
|
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
|
|
|
Jackett/Jackett
API Support for your favorite torrent trackers
|
|
|
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
|
|
|
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 - Flexible and Structured Logging for various .NET Platforms
|
|
|
cobbr/Covenant
Covenant is a collaborative .NET C2 framework for red teamers.
|
|
|
IvanMurzak/Unity-MCP
AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.
|
|
|
ravendb/ravendb
ACID Document Database
|
|
|
ONLYOFFICE/CommunityServer
Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator.
|
|
|
liukuo362573/YiShaAdmin
基于 .NET Core MVC 的权限管理系统,代码易读易懂、界面简洁美观
|
|
|
izhaorui/Zr.Admin.NET
🎉 ZR.Admin.NET —— 基于 .NET 8 + SqlSugar + Vue3 的前后端分离通用权限管理框架(RBAC),跨平台、开箱即用。内置 SaaS 多租户(一租户一库)、可视化工作流引擎、一键代码生成、Quartz.NET 任务调度、Redis 缓存、SignalR 实时通知、接口限流、全局异常处理、数据权限过滤与动态国际化,并集成 AI 助手与 AI 治理能力。代码简洁易懂、易扩展。
|
|
|
AlphaYu/adnc
A pragmatic .NET 8 framework for modular monoliths to evolve seamlessly into distributed microservices.
|
|
|
iioter/iotgateway
An industrial IoTGateway with B/S architecture that enables bidirectional communication between industrial devices (southbound connections) and IoT platforms (northbound connections). It supports numerous industrial protocols, and can connect to various IoT cloud platforms.
|
|
|
Mimetis/Dotmim.Sync
A brand new database synchronization framework, multi platform, multi databases, developed on top of .Net Standard 2.0. https://dotmimsync.readthedocs.io/
|
|
|
dotnetzoom/AspNetCore-WebApi-Course
🥇 Professional REST API design with ASP.NET Core WebAPI
|
|
|
lysilver/KopSoftWms
KopSoft仓库管理系统
|
|
|
91270/Meiam.System
.NET 8 / .NET 5 WebAPI + Vue 2.0 + RBAC 企业级前后端分离权限框架
|
|
|
leeveel/GeekServer
基于.Netcore的开发效率高,性能强,跨平台,持久化层透明,支持不停服热更新的游戏服务器。Best for your unity game server!
|
|
|
ShokoAnime/ShokoServer
Shoko is a media metadata aggregator that solves all of the annoying edge cases that face anime's differing structure from western media. It integrates directly with media software rather than working around things like nfo files or naming conventions.
|
|
|
dorisoy/Dorisoy.Pan
Dorisoy.Pan 是基于 .NET 10 的跨平台文档管理系统,使用 MS SQL 2012 / MySQL 8.0(或更高版本)后端数据库,您可以在 Windows、Linux 或 Mac 上运行它。项目中的所有方法都是异步的,支持 JWT 令牌身份验证,项目体系结构遵循 CQRS + MediatR 模式和最佳安全实践。源代码完全可定制,热插拔且清晰的体系结构,使开发定制功能和遵循任何业务需求变得容易。
|
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.2 | 80,288 | 10/15/2026 |
| 6.2.1 | 476,466 | 9/16/2026 |
| 6.2.0 | 621,813 | 8/16/2026 |
| 6.1.4 | 984,707 | 7/8/2026 |
| 6.1.3 | 2,703,545 | 5/5/2026 |
| 6.1.2 | 2,426,081 | 2/28/2026 |
| 6.1.1 | 1,048,357 | 1/31/2026 |
| 6.1.0 | 2,268,378 | 11/12/2025 |
| 6.0.6 | 194,156 | 11/9/2025 |
| 6.0.5 | 1,018,622 | 10/9/2025 |
| 6.0.4 | 811,950 | 9/11/2025 |
| 6.0.3 | 1,152,002 | 8/10/2025 |
| 6.0.2 | 559,066 | 7/20/2025 |
| 6.0.1 | 605,634 | 6/28/2025 |
| 6.0.0 | 304,025 | 6/21/2025 |
| 5.5.0 | 6,704,771 | 5/29/2025 |
| 5.4.0 | 9,519,097 | 2/2/2025 |
ChangeLog:
- [#1195] Updated dependency NLog v6.2.2 (@snakefoot)
List of major changes in NLog v6.0: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.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