From 2315ccac2306caff3942916326d1569886cfa4e8 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 14 May 2022 20:40:08 -0500 Subject: improve logging of shares --- src/slskd/Shares/SharedFileCache.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/slskd/Shares/SharedFileCache.cs') diff --git a/src/slskd/Shares/SharedFileCache.cs b/src/slskd/Shares/SharedFileCache.cs index 3e305f08..ac996fa6 100644 --- a/src/slskd/Shares/SharedFileCache.cs +++ b/src/slskd/Shares/SharedFileCache.cs @@ -199,11 +199,13 @@ namespace slskd.Shares Log.Warning("Aborting shared file scan; no shares configured."); } - foreach (var share in Shares) - { - Log.Information($"Sharing {share.LocalPath} as {share.RemotePath}"); - Log.Debug($"Raw: {share.Raw}, Alias: {share.Alias}, Mask: {share.Mask}, Remote: {share.RemotePath})"); - } + Shares.ForEach(s => Log.Debug(s.ToJson())); + + Shares.Where(s => !s.IsExcluded).ToList() + .ForEach(s => Log.Information("Sharing {Local} as {Remote}", s.LocalPath, s.RemotePath)); + + Shares.Where(s => s.IsExcluded).ToList() + .ForEach(s => Log.Information("Excluding {Local}", s.LocalPath)); Log.Debug("Enumerating shared directories"); swSnapshot = sw.ElapsedMilliseconds; -- cgit v1.2.3