You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a minor issue regarding the logs that EF produces. For the CommandExecuted event, among other properties, EF adds an elapsed field. The field is added as a string, instead of int or any other numeric format (e.g. the commandTimeout is properly added as a number). It's a minor annoyance while querying the logs. The elapsed field is very useful information actually.
Looking at the source code, it seems EF adds the elapsed property as TimeSpan. If you can confirm that, then we'll discuss the issue with the logging providers. The issue can be closed if that's the case. Sorry for the inconvenience.
EDIT: I cross-checked and the logging providers handle TimeSpan in a different format. So, most probably, EF adds "elapsed" as a string.
Also related issue, any property like commandTimeout should include the units in the property name. In the sample you shared above, it's not clear what "commandTimeout": 30 means. Could be 30 minutes. 30 days. 30 seconds. 30 picoseconds. Why not call it commandTimeoutSeconds (or whatever it's supposed to be, in terms of units).
As a side note, ASP.NET Core uses decimal type for ElapsedMilliseconds. I'm not sure if it's done to display sub-millisecond values or to handle large numbers. The Stopwatch.ElapsedMilliseconds returns long and perhaps that's sufficient.
Hi,
This is a minor issue regarding the logs that EF produces. For the CommandExecuted event, among other properties, EF adds an
elapsed
field. The field is added as a string, instead of int or any other numeric format (e.g. the commandTimeout is properly added as a number). It's a minor annoyance while querying the logs. The elapsed field is very useful information actually.Here is a sample output:
Thanks!
The text was updated successfully, but these errors were encountered: