danidiaz / counter

overengineered REST server which provides counters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow tagging log messages with the component which produced them.

danidiaz opened this issue · comments

Currently, we tag log messages with the Servant endpoint which triggered them. (A bit like the Mapped Diagnostic Context works in Java's Logback).

But it would be nice to also tag them with the particular component (that is, the record-of-functions) to which they belong. This is analogous to the Java practice of providing the class as an argument when creating a logger. (In our case, we could provide the component's TypeRep).

Having to specify the component for each log message would be annoying, so some kind of automation is desirable.