Fork me on GitHub
#pedestal
<
2018-02-21
>
souenzzo00:02:45

Lacinia-pedestal do websocket, with code reuse with pedestal interceptors.

dadair01:02:50

thanks! taking a look at that now

hlship19:02:20

It seems like the Pedestal implementation is built around a somewhat specific use case, but it was reasonable to work around it.

hlship19:02:59

I've been embracing io.pedestal.log for a new project and really like the idea of logging as pure data ... there's a freedom that comes from not thinking in terms of user-readable messages, but instead, machine-interpretable events. Anyway, one thing I find missing in io.pedestal.log is support for a MDC (message diagnostic context).

mitchelkuijpers20:02:32

Have you tried Cambium for this? We use this exactly for data based logging

hlship19:02:25

I would love to see a dynamic var containing a map of event keys/values that would be merged with those supplied by the call to log/debug and friends.

hlship19:02:22

Use case is primarily a request correlation id; I would like to set a rid at request inception and be able to see what rid across all logged events (many of which are asynchronous).

hlship19:02:52

I have cycles to put together a PR, but would love to hear from the gate keepers first.

hlship19:02:57

Also, even a simple map may not be perfect, in some ways I'd prefer a delegate function that could be passed the event map and could return a modified event map prior to pr-str and passing it off to SLF4J.

hlship19:02:26

In the past, I've tried to hack this kind of thing using Logback's MDC support, but it ends up being a battle of the thread-locals (Clojure dynamic bindings vs. Java thread locals used to store the MDC).