From ffa2b220221040997e9ebacb4a08136e80c9a7b3 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 4 Aug 2025 09:15:01 -0500 Subject: add some debug statements to option monitoring --- src/slskd/Application.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index a28d2a2f..e1f8d762 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1270,6 +1270,8 @@ namespace slskd // shenanigans here could lead to missed updates. await OptionsSyncRoot.WaitAsync(); + Log.Debug("OptionsMonitor OnChange Invoked"); + try { var pendingRestart = false; @@ -1281,9 +1283,12 @@ namespace slskd // don't react to duplicate/no-change events https://github.com/slskd/slskd/issues/126 if (!diff.Any()) { + Log.Debug("Diff of previous and new options is the same; nothing to do"); return; } + Log.Debug("Diff of previous and new options contains {Count} changed properties: {Properties}", diff.Count(), diff.Select(p => p.FQN)); + foreach (var (property, fqn, left, right) in diff) { static bool HasAttribute(PropertyInfo property) => property.CustomAttributes.Any(a => a.AttributeType == typeof(T)); -- cgit v1.2.3