Let's say I have reactive application with a following ReactiveWebFilter filter

@Component
public class ReactiveWebFilter implements WebFilter {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
        return chain.filter(exchange).contextWrite(context -> context.put("foo", "bar"));
    }

}

It would be nice to log foo value. Neither logging.structured.format.console=logstash nor implementing custom StructuredLogFormatter<ILoggingEvent> seems to provide this feature.

Comment From: philwebb

I don't think we should attempt to tie the Reactor context with structured logging. IMO, the Logging MDC should be used for this purpose.