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

I’m curious about the design decisions here.

It seems that 99% of the changes here are manually plumbing the parameter around. For `IO` logging, passing the `Traced` value around makes sense, because then you don’t need to worry about monad stacks, type classes, etc and overly generalizing things. However, many of the functions here are operating in a `CanLog m => m a` context, or similar. `katip` has a perfectly fine monad transformer + type class for logging. Why aren’t we using that for polymorphic code which already expects a logging type class? If we did that, the changes would be to the definition of `CanLog m` and initialization/interpretation code, which is a relatively small part of the code base compared to literally every logging call site or functions that thread the logging through.

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