Hacker News new | ask | show | jobs
by cromantin 2668 days ago
Yes. This is correct way to do logging. Pass an object with request, user, logger and other attributes around as you process it. This is basically "session"
1 comments

This is the exact problem I solved with CabinJS; making this simple on both client and server. I've tried nearly every logging service and they continually get one thing or the other wrong (even after my attempts to fix them).

https://cabinjs.com

Hapi.js does this natively.
No, it does not do it to best standards and simplicity. Hapi itself is also incredibly convoluted and bloated.