Skip to content
This repository was archived by the owner on Dec 12, 2020. It is now read-only.

Commit 798be8b

Browse files
committed
touch-ups
1 parent 24f9d78 commit 798be8b

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/CodeGeneration.Roslyn.Tasks/GenerateCodeFromAttributes.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,26 @@ protected override void LogEventsFromTextOutput(string singleLine, MessageImport
103103
{
104104
MessageImportance newImportance;
105105
if (DidExtractPrefix("High"))
106+
{
106107
newImportance = MessageImportance.High;
108+
}
107109
else if (DidExtractPrefix("Normal"))
110+
{
108111
newImportance = MessageImportance.Normal;
112+
}
109113
else if (DidExtractPrefix("Low"))
114+
{
110115
newImportance = MessageImportance.Low;
116+
}
111117
else
118+
{
112119
newImportance = messageImportance;
120+
}
113121

114122
if (newImportance < messageImportance)
123+
{
115124
messageImportance = newImportance; // Lower value => higher importance
125+
}
116126

117127
base.LogEventsFromTextOutput(singleLine, messageImportance);
118128

src/CodeGeneration.Roslyn.Tool/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int Main(string[] args)
5555
}
5656
catch (Exception e)
5757
{
58-
Logger.Log(LogLevel.High, $"{e.Message}: {e.Message}");
58+
Logger.Log(LogLevel.High, $"{e.GetType().Name}: {e.Message}");
5959
Logger.Log(LogLevel.High, e.ToString());
6060
return 3;
6161
}

src/CodeGeneration.Roslyn/Logger.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ public enum LogLevel
1919
/// <summary>
2020
/// Low importance, appears in more verbose logs
2121
/// </summary>
22-
Low = 2
23-
22+
Low = 2,
2423
}
2524
public static class Logger
2625
{

0 commit comments

Comments
 (0)