We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 04038d0 + fb572f8 commit 9406664Copy full SHA for 9406664
src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLogger.cs
@@ -139,7 +139,7 @@ internal static LogEventProperty CreateEventIdProperty(EventId eventId)
139
140
if (eventId.Id != 0)
141
{
142
- if (eventId.Id < LowEventIdValues.Length)
+ if (eventId.Id >= 0 && eventId.Id < LowEventIdValues.Length)
143
// Avoid some allocations
144
properties.Add(LowEventIdValues[eventId.Id]);
145
else
0 commit comments