Skip to content

Commit bef556e

Browse files
committed
Improve log messages
1 parent 5a5fc79 commit bef556e

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Sdk.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ private static HashSet<DotNetVersion> ParseSdks(IList<string> listed)
6363
}
6464

6565
var path = Path.Combine(sdk.FullPath, "Roslyn", "bincore", "csc.dll");
66-
logger.LogInfo($"Source generator CSC: '{path}'");
66+
logger.LogDebug($"Source generator CSC: '{path}'");
6767
if (!File.Exists(path))
6868
{
69-
logger.LogInfo($"csc.dll not found at '{path}'.");
69+
logger.LogWarning($"csc.dll not found at '{path}'.");
7070
return null;
7171
}
7272

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/SourceGenerators/DotnetSourceGeneratorBase.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,17 @@ protected override IEnumerable<string> Run()
3434
var additionalFiles = AdditionalFiles;
3535
if (additionalFiles.Count == 0)
3636
{
37-
logger.LogDebug($"No {FileType} files found.");
37+
logger.LogDebug($"No {FileType} files found. Skipping source generation.");
3838
return [];
3939
}
4040

41-
logger.LogInfo($"Found {additionalFiles.Count} {FileType} files.");
42-
4341
if (!fileContent.IsAspNetCoreDetected)
4442
{
4543
logger.LogInfo($"Generating source files from {FileType} files is only supported for new (SDK-style) project files");
4644
return [];
4745
}
4846

49-
logger.LogInfo($"Generating source files from {FileType} files...");
47+
logger.LogInfo($"Generating source files from {additionalFiles.Count} {FileType} files...");
5048

5149
try
5250
{

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/SourceGenerators/DotnetSourceGeneratorWrapper/DotnetSourceGeneratorWrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public IEnumerable<string> RunSourceGenerator(IEnumerable<string> additionalFile
4545

4646
try
4747
{
48-
logger.LogInfo("Produce analyzer config content.");
48+
logger.LogInfo("Producing analyzer config content.");
4949
GenerateAnalyzerConfig(additionalFiles, analyzerConfig);
5050

5151
logger.LogDebug($"Analyzer config content: {File.ReadAllText(analyzerConfig)}");

0 commit comments

Comments
 (0)