cescoffier / vertx-completable-future

An implementation of CompletableFuture for Vert.x
Apache License 2.0
78 stars 28 forks source link

MDC for slf4j good in scala Futures but breaks in java's CompletableFuture #31

Open deanhiller opened 5 years ago

deanhiller commented 5 years ago

I am not sure if you can add this, but twitter's scala futures are amazing in that the MDC (VERY VERY critical piece of slf4j that is VERY VERY useful) can store a request id and every log.info will print that request id for us so we don't rely on developers/humans having to remember to add it to every log statement.

java's CompletableFutures broke this :(

see more here https://stackoverflow.com/questions/37933713/does-completablefuture-have-a-corresponding-local-context