Áú8¹ú¼Êµç×Óƽ̨

long8-Áú8(¹ú¼Ê)Ψһ¹Ù·½ÍøÕ¾ Ê×Ò³long8-Áú8(¹ú¼Ê)Ψһ¹Ù·½ÍøÕ¾Çå¾²·þÎñlong8-Áú8(¹ú¼Ê)Ψһ¹Ù·½ÍøÕ¾Ç徲ͨ¸æ long8-Áú8(¹ú¼Ê)Ψһ¹Ù·½ÍøÕ¾
ÕýÎÄ

Apache Log4j2 Ô¶³Ì´úÂëÖ´ÐÐÎó²îµÄÇå¾²Ô¤¾¯Ó뽨Òé

Ðû²¼Ê±¼ä£º2021-12-10 10:12   ä¯ÀÀ´ÎÊý£º5946

¿ËÈÕ£¬Áú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.png

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¡±£¬
¹Ø±ÕÏà¹ØÓ¦ÓõÄÍøÂçÍâÁ¬£¬Õ¥È¡×Ô¶¯ÍâÁ¬¡£



Áú8¹ú¼Êµç×Óƽ̨ °æȨËùÓÐ  ÁªÏµ: hxzhb@heidun.net ÃöICP±¸06011901ºÅ ? 1999-2024 Fujian Strait Information Corporation. All Rights Reserved.
long8-Áú8(¹ú¼Ê)Ψһ¹Ù·½ÍøÕ¾

·µ»Ø¶¥²¿

ÍøÕ¾µØͼ