Skip to content

Commit c15891c

Browse files
committed
Update counting of log levels
1 parent e4c1673 commit c15891c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Analogy.CommonControls/UserControls/LogMessagesUC.cs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,19 @@ private void LogGrid_CustomSummaryCalculate(object sender, CustomSummaryEventArg
11591159
{
11601160
if (e.FieldValue is not null)
11611161
{
1162-
counts[(string)e.FieldValue] += 1;
1162+
var key = (string)e.FieldValue;
1163+
if (counts.ContainsKey(key))
1164+
{
1165+
counts[(string)e.FieldValue] += 1;
1166+
}
1167+
else
1168+
{
1169+
var level = AnalogyLogMessage.ParseLogLevelFromString(key).ToString();
1170+
if (counts.ContainsKey(level))
1171+
{
1172+
counts[level] += 1;
1173+
}
1174+
}
11631175
}
11641176
}
11651177

0 commit comments

Comments
 (0)