Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Dev Tools 2020-01-27
Description
When logging duration objects we want special formatting to occur:
"duration"_attr = Milliseconds(10) |
Should be formatted as:
"durationMillis": 10 |
Where the attribute name is updated with a unit suffix added and the value should just be the duration count.
It creates an inconsistency we're determined is acceptable:
When logging durations in containers, such as:
std::vector<Milliseconds> vec = {Milliseconds(10), Milliseconds(50)}; |
"things"_attr = vec |
There is no attribute name for each duration that we can update and the duration will instead be logged as an object instead of just a scalar:
things: [{"durationMillis": 10}, {"durationMillis": 50}] |