nblumhardt/serilog-timings

System.DivideByZeroException

Closed this issue · 3 comments

Two of our customers get an exception. Unfortunately we cannot reproduce this. Maybe, the stacktrace helps.
Version in use 3.0.1

System.DivideByZeroException: Attempted to divide by zero.
at SerilogTimings.Operation.GetTimestamp()
at SerilogTimings.Operation..ctor(ILogger target, String messageTemplate, Object[] args, CompletionBehaviour completionBehaviour, LogEventLevel completionLevel, LogEventLevel abandonmentLevel, Nullable`1 warningThreshold)
at SerilogTimings.Operation.Time(String messageTemplate, Object[] args)

Hi! This issue was fixed in v3.0.1, I believe - the division operation in question is now based on double, which doesn't trigger this exception. Is it possible your customers are somehow running v3.0.0 of the assembly?

(see also: #50)

Hi,
Yes, you are right.
In release version we use 3.0.0, in develop 3.0.1
Thank you