¿ËÈÕ£¬Áú8¹ú¼Êµç×Óƽ̨ÐÅÏ¢Çå¾²ÍþвÇ鱨ÖÐÐļà²âµ½Apache Log4j2±»Æر£´æÔ¶³Ì´úÂëÖ´ÐÐÎó²î£¬Îó²îʹÓÃÀֳɽ«µ¼ÖÂÓû§Ó¦ÓÃϵͳ¼°·þÎñÆ÷ϵͳ±»¿ØÖÆ¡£
Ò»¡¢Îó²îÐÎò
Apache Log4j2ÊÇÒ»¸ö»ùÓÚJavaµÄÈÕÖ¾¼Í¼¹¤¾ß£¬ÊÇLog4jµÄÉý¼¶£¬ÔÚÆäÇ°ÉíLog4j 1.x»ù´¡ÉÏÌṩÁËLogbackÖпÉÓõÄÐí¶àÓÅ»¯£¬Í¬Ê±ÐÞ¸´ÁËLogback¼Ü¹¹ÖеÄһЩÎÊÌ⣬ÊÇÏÖÔÚ×îÓÅÒìµÄJavaÈÕÖ¾¿ò¼ÜÖ®Ò»¡£¸ÃÈÕÖ¾¿ò¼Ü±»´ó×ÚÓÃÓÚӪҵϵͳ¿ª·¢£¬ÓÃÀ´¼Í¼ÈÕÖ¾ÐÅÏ¢¡£¿ª·¢Õß¿ÉÄܻὫÓû§ÊäÈëÔì³ÉµÄ¹ýʧÐÅϢдÈëÈÕÖ¾ÖС£
ÓÉÓÚApache Log4j 2ijЩ¹¦Ð§±£´æµÝ¹éÆÊÎö¹¦Ð§£¬¹¥»÷Õß¿ÉÖ±½Ó½á¹¹¶ñÒâÇëÇ󣬴¥·¢Ô¶³Ì´úÂëÖ´ÐÐÎó²î¡£´¥·¢Ìõ¼þΪֻҪÍⲿÓû§ÊäÈëµÄÊý¾Ý»á±»ÈÕÖ¾¼Í¼£¬¼´¿ÉÔì³ÉÔ¶³Ì´úÂëÖ´ÐС£
¶þ¡¢Ó°Ïì¹æÄ£
Apache Log4j 2.x <= 2.14.1
Èý¡¢Çå¾²Ìá·À½¨Òé
Áú8¹ú¼Êµç×Óƽ̨ÐÅÏ¢ÌáÐѸ÷Ïà¹Øµ¥Î»ºÍÓû§ÒªÇ¿»¯Î£º¦Òâʶ£¬ÇÐʵÔöÇ¿Çå¾²Ìá·À£º
1¡¢ÏÖÔÚÁú8¹ú¼Êµç×Óƽ̨̬ÊƸÐÖª¡¢·À»ðǽ¡¢IPSµÈÇå¾²×°±¸¹æÔòÒÑÖ§³Ö¸ÃÎó²î¹¥»÷¼°Ïà¹ØÎó²îµÄ¼ì²â£¬ÇëÏà¹ØÓû§ÊµÊ±Éý¼¶×°±¸Çå¾²¹æÔò£¬Ïà¹ØÌØÕ÷¿âÒÑÐû²¼µ½¹ÙÍøhttp://www.si.net.cn/Technical/upgrade.html
2¡¢½¨ÒéÅŲéJavaÓ¦ÓÃÊÇ·ñÒýÈëlog4j-api , log4j-core Á½¸öjar£¬Èô±£´æʹÓ㬼«´ó¿ÉÄÜ»áÊܵ½Ó°Ï죬Èçͼ£º
1¡¢Éý¼¶¹Ù·½²¹¶¡£¨ÈôÓиüа汾½¨ÒéÉý¼¶µ½×îУ©£¬¼û
https://github.com/apache/logging-log4j2/releases/tag/log4j-2.15.0-rc2
2¡¢ÔÝʱ½â¾ö¼Æ»®
ÉèÖÃjvm²ÎÊý ¡°-Dlog4j2.formatMsgNoLookups=true¡±£¬
ÉèÖá°log4j2.formatMsgNoLookups=True¡±£¬
½«ÏµÍ³ÇéÐαäÁ¿¡°FORMAT_MESSAGES_PATTERN_DISABLE_LOOKUPS¡±ÉèÖÃΪ¡°true¡±£¬
¹Ø±ÕÏà¹ØÓ¦ÓõÄÍøÂçÍâÁ¬£¬Õ¥È¡×Ô¶¯ÍâÁ¬¡£
·µ»Ø¶¥²¿