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.
1 parent 04038d0 commit fb572f8Copy full SHA for fb572f8
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