From df6a437518d89eebfa1a583e09ec99c462e64e47 Mon Sep 17 00:00:00 2001
From: Moli <13026959681@163.com>
Date: 星期三, 12 八月 2026 20:42:12 +0800
Subject: [PATCH] 移除发布文件的跟踪
---
src/Moli.Desktop/Runtime/RuntimeState.cs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/Moli.Desktop/Runtime/RuntimeState.cs b/src/Moli.Desktop/Runtime/RuntimeState.cs
index 75401ba..d119a6f 100644
--- a/src/Moli.Desktop/Runtime/RuntimeState.cs
+++ b/src/Moli.Desktop/Runtime/RuntimeState.cs
@@ -1,6 +1,8 @@
using Moli.Desktop.Diagnostics;
using Moli.Desktop.Layout;
using Moli.Desktop.Plugins;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
namespace Moli.Desktop.Runtime;
@@ -42,6 +44,12 @@
{
private readonly object _gate = new();
private readonly List<Func<RuntimeEvent, Task>> _handlers = [];
+ private readonly ILogger<RuntimeEventBus> _logger;
+
+ public RuntimeEventBus(ILogger<RuntimeEventBus>? logger = null)
+ {
+ _logger = logger ?? NullLogger<RuntimeEventBus>.Instance;
+ }
public IDisposable Subscribe(Func<RuntimeEvent, Task> handler)
{
@@ -61,6 +69,7 @@
public async Task PublishAsync(RuntimeEvent runtimeEvent, CancellationToken cancellationToken = default)
{
+ _logger.LogDebug("Runtime event published: {EventName}", runtimeEvent.Name);
Func<RuntimeEvent, Task>[] handlers;
lock (_gate)
{
--
Gitblit v1.9.1