From d7ac846e4f3832e3897228c5d46ca0d5cd5ae80f Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 1 Sep 2024 18:41:19 -0500 Subject: log when there are no subscribers for an event --- src/slskd/Events/EventBus.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/slskd/Events/EventBus.cs b/src/slskd/Events/EventBus.cs index b38591b3..d51e2fd7 100644 --- a/src/slskd/Events/EventBus.cs +++ b/src/slskd/Events/EventBus.cs @@ -93,6 +93,10 @@ public class EventBus Task.Run(() => (subscriber.Value as Func)(data)) .ContinueWith(task => Log.Error(task.Exception, "Subscriber {Name} for {Type} encountered an error: {Message}", subscriber.Key, typeof(T), task.Exception.Message)))); } + else + { + Log.Debug("No subscribers for {Type}", typeof(T)); + } } /// -- cgit v1.2.3