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"
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