Skip to content

Commit d7f8b96

Browse files
committed
Improve logging
1 parent 95896bc commit d7f8b96

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.Nuget.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,15 @@ private HashSet<string> GetAllFeeds(List<FileInfo> allFiles)
490490
.SelectMany(GetFeeds)
491491
.Where(str => !string.IsNullOrWhiteSpace(str))
492492
.ToHashSet();
493-
logger.LogInfo($"Found Nuget feeds in nuget.config files: {string.Join(", ", feeds.OrderBy(f => f))}");
493+
494+
if (feeds.Count > 0)
495+
{
496+
logger.LogInfo($"Found {feeds.Count} Nuget feeds in nuget.config files: {string.Join(", ", feeds.OrderBy(f => f))}");
497+
}
498+
else
499+
{
500+
logger.LogDebug("No Nuget feeds found in nuget.config files.");
501+
}
494502
return feeds;
495503
}
496504

0 commit comments

Comments
 (0)