CodeWF.Toolkit.Logging.Microsoft
1.1.10
dotnet add package CodeWF.Toolkit.Logging.Microsoft --version 1.1.10
NuGet\Install-Package CodeWF.Toolkit.Logging.Microsoft -Version 1.1.10
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeWF.Toolkit.Logging.Microsoft" Version="1.1.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeWF.Toolkit.Logging.Microsoft" Version="1.1.10" />
<PackageReference Include="CodeWF.Toolkit.Logging.Microsoft" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeWF.Toolkit.Logging.Microsoft --version 1.1.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeWF.Toolkit.Logging.Microsoft, 1.1.10"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeWF.Toolkit.Logging.Microsoft@1.1.10
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeWF.Toolkit.Logging.Microsoft&version=1.1.10
#tool nuget:?package=CodeWF.Toolkit.Logging.Microsoft&version=1.1.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeWF.Toolkit.Logging.Microsoft
Microsoft.Extensions.Logging 提供程序,将应用日志统一接入轻量日志核心。Microsoft.Extensions.Logging provider bridging to the lightweight logging core.
安装
dotnet add package CodeWF.Toolkit.Logging
dotnet add package CodeWF.Toolkit.Logging.Microsoft
依赖 Microsoft.Extensions.{DependencyInjection.Abstractions, Hosting.Abstractions, Logging, Logging.Configuration, Options} 与本仓 CodeWF.Toolkit.Logging、CodeWF.Toolkit.Lang(随包自动安装);目标框架 net10.0。
用法
builder.Logging.AddCodeWFLogger(options =>
{
// 与 CodeWF.Toolkit.Logging 的 LoggerOptions 相同
options.MinimumLevel = LogLevel.Information;
options.File = new FileLogOptions
{
DirectoryPath = Path.Combine(AppContext.BaseDirectory, "logs"),
};
});
CodeWFLoggerProvider + CodeWFLoggerOptionsSetup 支持配置绑定;MessageTemplateParser 解析结构化模板;CodeWFUserLogState 支持按用户标记日志。MEL 生态的日志由此统一进入轻量核心:控制台输出、文件轮转与 UI 日志事件流一次到位。
注意事项
- UI 事件流回调在后台线程触发,界面订阅方需自行调度到 UI 线程。
- 退出前请调用
Logger.ShutdownAsync()刷盘(见核心包)。
文档
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- CodeWF.Toolkit.Lang (>= 1.1.10)
- CodeWF.Toolkit.Logging (>= 1.1.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 11.0.0)
- Microsoft.Extensions.Logging (>= 11.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0)
- Microsoft.Extensions.Options (>= 11.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.10 | 48 | 11/20/2026 |
| 1.1.9 | 85 | 11/16/2026 |
| 1.1.8 | 92 | 11/16/2026 |
| 1.1.7 | 84 | 11/16/2026 |
| 1.1.6 | 73 | 11/8/2026 |
| 1.1.5 | 64 | 11/8/2026 |
| 1.1.4 | 58 | 11/8/2026 |
| 1.1.3 | 65 | 11/8/2026 |
| 1.1.2 | 116 | 11/1/2026 |
| 1.1.1 | 107 | 10/26/2026 |
| 1.1.0 | 98 | 10/22/2026 |
| 1.1.0-alpha.1 | 67 | 10/21/2026 |
| 1.0.0.27 | 99 | 10/19/2026 |
| 1.0.0.26 | 108 | 10/16/2026 |
| 1.0.0.25 | 104 | 10/16/2026 |
| 1.0.0.24 | 111 | 10/15/2026 |
| 1.0.0.23 | 105 | 10/15/2026 |
| 1.0.0.22 | 101 | 10/15/2026 |
| 1.0.0.20 | 93 | 10/15/2026 |
| 1.0.0.19 | 105 | 10/15/2026 |
Loading failed