Fork me on GitHub

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


thanks! taking a look at that now


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


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).


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


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.


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).


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


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.


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).