Indentation-aligned log lines
Opened this issue · 1 comments
nivekuil commented
I inadvertently discovered that mulog's structured logging facilitates map alignment to make the log events, in my eyes, a lot more readable:
{:mulog/event-name :app.server/api,
:mulog/timestamp "Tue Apr 06 14:18:11 PDT 2021",
:mulog/duration 0.741753,
:mulog/namespace "app.server",
:mulog/outcome :ok,
:req/user #uuid "0dc03bed-b65d-4bef-89f3-37635ea8ff8f"}
{:mulog/event-name :app.server/api,
:mulog/timestamp "Tue Apr 06 14:18:20 PDT 2021",
:mulog/duration 0.630531,
:mulog/namespace "app.server",
:mulog/outcome :ok,
:req/user #uuid "0dc03bed-b65d-4bef-89f3-37635ea8ff8f"}
Currently this is done with aggressive-indent-mode on in the repl buffer. Maybe it makes sense to add to mulog directly, fitting in with pretty logging as part of #45?
BrunoBonacci commented
Interesting, the default pretty-printing doesn't align the values, but with the Ansi logger we could look into this.