Zeek.Logging 10.0.42

Zeek.Logging

Zeek.Logging 是桌面日志增强模块,在 Core 标准 logging 根能力之上追加 Serilog 文件和 Debug 输出。

适用场景

  • 需要桌面应用默认日志文件和 Debug 输出。
  • 需要继续通过 ILogger<T>BeginScope(...) 编写业务日志。
  • 需要使用 Serilog 原生 LoggingLevelSwitch 控制全局最低等级。

安装 / 引用

<PackageReference Include="Zeek.Logging" />

快速开始

在根模块依赖 LoggingModule。业务代码继续注入 ILogger<T>,不用依赖 Serilog 具体实现。

默认相对日志路径基于 Core 唯一主配置文件所在目录,因此普通桌面应用无需手写用户目录或 File sink 样板。

Serilog logger 只在 DI 创建 SerilogLoggerProvider 时创建,并立即由 provider 接管 Dispose / flush;后续模块或 Host Build 失败不会留下无 owner 的 logger 句柄。

AOT / Trim

  • AOT 支持等级:Required。
  • Trim 策略:显式模块依赖和显式 sink 接线。
  • 反射策略:不以运行时扫描发现日志 sink 或业务 logger。

Sample

  • ../../samples/Zeek.LoggingSample/

完整文档

  • ../../docs/modules/Zeek.Logging.md

当前限制

  • 本模块不创建 Core logging 根能力。
  • 本模块不负责 Diagnostics 数据源、远程日志平台、APM、OpenTelemetry 管线、日志 UI 或业务审计。

Showing the top 20 packages that depend on Zeek.Logging.

Packages Downloads
Zeek.Diagnostics
AOT-friendly local diagnostics snapshots and support packages for Zeek desktop applications.
4
Zeek.Diagnostics
AOT-friendly local diagnostics snapshots and support packages for Zeek desktop applications.
3

Version Downloads Last updated
10.0.42 4 07/29/2026
10.0.41 14 07/22/2026
10.0.40 9 07/22/2026
10.0.39 19 07/19/2026
10.0.38 15 07/17/2026
10.0.37 1 07/16/2026
10.0.36 5 06/29/2026
10.0.35 2 06/29/2026
10.0.31 5 06/27/2026
10.0.30 2 06/27/2026
10.0.29 3 06/26/2026
10.0.28 2 06/26/2026
10.0.27 2 06/26/2026
10.0.26 4 06/25/2026
10.0.25 4 06/24/2026
10.0.24 7 06/20/2026
10.0.23 5 06/19/2026
10.0.22 7 06/18/2026
10.0.21 5 06/18/2026
10.0.20 9 06/17/2026
10.0.19 4 06/17/2026
10.0.18 8 06/16/2026
10.0.17 5 06/16/2026
10.0.16 5 06/15/2026
10.0.15 6 06/15/2026
10.0.14 6 06/15/2026
10.0.13 7 06/14/2026
10.0.12 4 06/14/2026
10.0.11 6 06/14/2026
10.0.10 3 06/13/2026
10.0.9 3 06/12/2026
10.0.8 3 06/11/2026
10.0.7 3 06/11/2026
10.0.6 3 06/10/2026
10.0.5 3 06/10/2026
10.0.3 2 06/10/2026
10.0.2 3 06/10/2026
10.0.1 3 06/08/2026
10.0.0 3 06/08/2026