[input-output-hk/cardano-sl] [CBR-97] structured logging (#3358)

CodiePP commented on this pull request.

> @@ -48,7 +50,25 @@ data SlotId = SlotId

instance Buildable SlotId where
build SlotId {..} =
— bprint (ords%» slot of «%ords%» epoch») (getSlotIndex siSlot) siEpoch
+ bprint (intords%» slot of «%intords%» epoch»)
+ (getSlotIndex siSlot) (getEpochIndex siEpoch)
+
+— | temporary reimplementation of ‘ords’ from «Formatting»
+— because the original function converts the integer value to a real number
+intords :: (Show n, Integral n) => Format r (n -> r)

@cleverca22 this is your function adapted to this use case. will be called with a `Word16` (slot) and a `Word64` value for the epoch.

Добавить комментарий