-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Consider using a format string for TimeSpan.TotalMilliseconds in log messages #14854
Copy link
Copy link
Closed
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsclean-upThis issue is internal clean-up and has no effect on public APIs or expected behaviorsThis issue is internal clean-up and has no effect on public APIs or expected behaviorsfeature-platformDeprecated: Cross-cutting issues related to ASP.NET Core as a platformDeprecated: Cross-cutting issues related to ASP.NET Core as a platform
Milestone
Metadata
Metadata
Assignees
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsclean-upThis issue is internal clean-up and has no effect on public APIs or expected behaviorsThis issue is internal clean-up and has no effect on public APIs or expected behaviorsfeature-platformDeprecated: Cross-cutting issues related to ASP.NET Core as a platformDeprecated: Cross-cutting issues related to ASP.NET Core as a platform
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
Since .NET Core 3, floating-point value's ToString behavior has changed. I now frequently see things like
200.19760000000002 msin the log which looks rather clumsy.To Reproduce
Expected behavior
TimeSpan.TicksPerMilliSecond == 10000, so a format string ofF4shows all the relevant digits.