How to get MDC context in reactive calls

111 Views Asked by At

I've followed the method shared in this repo to attach MDC information to logs in a reactive Spring Boot 3 application, but in my toy application when I try to use contextWrite to add an "mdc" context item, I don't see it in the logs. If I set a breakpoint [in the MdcContextLifter(https://github.com/spartanhooah/reactive-logging-demo/blob/master/src/main/java/com/example/demo/MdcContextLifter.java#L54) I do see my "mdc" context key go through the lambdas. What would be preventing it from getting from there to the actual logs?

0

There are 0 best solutions below