How to get back MDC “inheritance” with modern logback?

前端 未结 2 1032
情书的邮戳
情书的邮戳 2021-02-09 13:45

After going back to an older project and getting around to update its dependencies I had to realize that logback does not anymore propagate MDCs to children since version

2条回答
  •  别跟我提以往
    2021-02-09 14:22

    Way 4: Misuse TurboFilter

    ch.qos.logback.classic.Logger passes the logging event to a filter before passing it along to the appenders.

    Way 5: Modify log Encoder / provider Although this would mean the logging event is not updated, but the log output will be.

提交回复
热议问题