<@U4H0M349G> <https://www.http4k.org/cookbook/requ...
# http4k
r
@dave https://www.http4k.org/cookbook/request_context/ I’m using context key to save/retrieve a context of a request for logging purposes. I was wondering, do you guys pass that context on the main handler of your route and pass it down to relevant methods for logging, or do you pass down the request itself and lens out the context every time you log.
d
We don't tend to do that TBH as we use the "operational events" model to construct objects with explicit fields which are then sent to an instance of the Events interface (which uses a Json to Marshall it into the printstream)
👍 1
But don't listen to me! passing the context down will work 🙃.
r
What you just said sounds juicy 😄 I wonder if it’s easier to use/ more performant injecting down context manually to all methods in a handler.
Sorry I’m new to backend, so everything I do is basically new o_o
Well, maybe I can’t say new anymore, 5 months now… time passes by fast
d
Fear not - I'm 20 years in and the imposter syndrome is still going strong! 🙃
😂 1
r
Ahahaha xD Nooo you guys made an amazing library! I mean I can tell, I saw some other libraries and they were not even close, http4k is way easier to use. It’s so easy that I was stupid enough to not use enough interfaces, which means if you guys stop supporting it and I have to change a framework, changes in code are going to be bad, very bad. Please continue doing awesome stuff 😄
Also good performance, I mean I think I will program any back end in kotlin not because of kotlin, because of http4k xD