![](/img/trans.png)
[英]How to update ${ctx:key} to achieve dynamic file name without executing log4j2 reconfigure()
現在我對 log4j2 有疑問。 我的目標是:根據MDC map中“fileName”的值來確定記錄哪個文件。 例如 我的 log4j2.xml 是 如果我取消注釋 reconfigure(),它會在執行 A.test()、“aaa”、“cccc”時登錄 A.log,在執行 B.test()、“bb ...