One of the huge things in java was the MDC for logging where you can do this
- in filter for request, set MDC.put(“user”, username) and MDC.put(“reqId”, generate());
- log, log, log and it outputs the user and reqId on evey log without the developer needing worry about it.
Along came Promises, Futures and async programming breaking this and Twitter fixed this with a Context that plugged into that MDC. It basically acted as a request context that floats from method to method without developers having to pass userId and reqId EVERYWHERE.
Does bunyan or winston support this? (or are these libraries 15 years behind java in that respect making it hard for every log to print out the request id associated with that request so as a programmer I can follow the flow).
yes, MDC has existed in log4j as far back as 2010.
nothing yet as I am asking if possible.