serilog / serilog-extensions-logging

Serilog provider for Microsoft.Extensions.Logging
Apache License 2.0
309 stars 99 forks source link

Index out of range exception with negative event ids #149

Closed credfeto closed 4 years ago

credfeto commented 4 years ago

https://github.com/serilog/serilog-extensions-logging/blob/04038d0429998eb79e1d20c653fdc900a185c24d/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLogger.cs#L142

Stack trace:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Serilog.Extensions.Logging.SerilogLogger.CreateEventIdProperty(EventId eventId)
   at Serilog.Extensions.Logging.SerilogLogger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter)
   at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter)
nblumhardt commented 4 years ago

This was fixed in 3.0.1