How do you differentiate log4j sessions in a log file from copies of the same web-app?

后端 未结 4 1319
滥情空心
滥情空心 2021-01-05 04:35

There is only one file. And it is written simultaneously as web app copies run.

How do you filter only one session log messages from other log lines?

4条回答
  •  不知归路
    2021-01-05 05:10

    Here is a page that sets up an MDC filter for web-app -> http://rtner.de/software/MDCUserServletFilter.html

    Being a servlet filter it will free you from managing MDC/NDC in each of your servlets.

    Of course, you should modify it to save information more pertinent to your web-app.

提交回复
热议问题