锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线观看国产精品入口,中文字幕在线免费专区,亚洲精品720phttp://www.aygfsteel.com/wqhtomcat/category/18060.html鎬?琛?璺?/description>zh-cnFri, 02 Mar 2007 06:51:33 GMTFri, 02 Mar 2007 06:51:33 GMT60Log4j鐮旂┒http://www.aygfsteel.com/wqhtomcat/articles/85701.htmlwqhtomcatwqhtomcatTue, 05 Dec 2006 14:28:00 GMThttp://www.aygfsteel.com/wqhtomcat/articles/85701.htmlhttp://www.aygfsteel.com/wqhtomcat/comments/85701.htmlhttp://www.aygfsteel.com/wqhtomcat/articles/85701.html#Feedback0http://www.aygfsteel.com/wqhtomcat/comments/commentRss/85701.htmlhttp://www.aygfsteel.com/wqhtomcat/services/trackbacks/85701.html Log4J 鍘熺悊浠ュ強閰嶇疆鐨勭爺絀?/span>

鍦ㄨ繘琛?/span> Log4J 鐨勪嬌鐢ㄨ繃紼嬩腑錛屾垜瀵逛笅闈㈢殑涓や釜闂姣旇緝鏁忔劅錛?/span>

1銆?span style="FONT: 7pt 'Times New Roman'">聽 Log4J 鏄浣曡繘琛屽伐浣滅殑錛?/span>

榪欐槸鍦?/span> Log4J 欏圭洰涓 Log4J 鐨勪粙緇嶄腑鐨勪竴孌佃瘽

With log4j it is possible to enable logging at runtime without modifying the application binary. The log4j package is designed so that these statements can remain in shipped code without incurring a heavy performance cost. Logging behavior can be controlled by editing a configuration file, without touching the application binary.

瀵逛簬 Log4J 鐨勫叿浣撳浣曡繘琛屽伐浣滅殑鍘熺悊錛屽湪 javaeye 涓?/span> buaawhl 緇欏嚭浜嗕竴涓В閲婏細

http://buaawhl.javaeye.com/blog/6450

鎬葷粨涓涓嬪氨鏄埄鐢?/span> JDK 鎻愪緵鐨?/span> new Throwable().getStackTrace() 鏂規硶榪斿洖褰撳墠榪愯鏍堢殑緇撴瀯灞傛錛岀劧鍚庡榪斿洖鐨勮皟鐢ㄦ爤鐨勪俊鎭繘琛屽垎鏋愶紝鎵懼埌璋冪敤璇ョ被鐨勭被鐨勫悕縐般?/span>

鐢變簬鍦?/span> Log4J 涓彧瀛樺湪涓涓牴 Logger 錛屽茍涓?/span> Logger 涔嬮棿瀛樺湪緇ф壙鐨勫叧緋伙紝騫朵笖鎴戜滑鍙互鍦ㄩ厤緗枃浠訛紙 log4J.proerties 鎴栬?/span> XML 錛変腑榪涜閰嶇疆錛屽彲浠ュ垵濮嬪寲鎸囧畾鐨?/span> Logger 錛屽茍涓斿鎸囧畾鐨?/span> Logger 榪涜涓浜涚浉鍏崇殑閰嶇疆錛屽璁劇疆濡備綍榪涜杈撳嚭錛屼互鍙婂浣曞皢杈撳嚭榪涜甯冨眬銆傚茍涓旂敱浜?/span> Logger 涔嬮棿浼氬瓨鍦ㄧ戶鎵跨殑鍏崇郴錛堜細鎵句竴涓渶榪戠殑 Logger 榪涜緇ф壙錛屽鏋滄病鏈夊氨浠ユ牴 Logger 浣滀負鐖剁被錛屽叡浜埗綾葷殑閰嶇疆淇℃伅錛夛紝浠ュ強鐖跺瓙綾諱箣闂村垵濮嬪寲娌℃湁鍏堝悗鐨勯『搴忥紝鎵浠ユ垜浠彲浠ュ湪閰嶇疆鏂囦歡涓紝瀵瑰悇涓▼搴忎互鍙婁笉鍚岀殑鍖呬腑浣跨敤鍒?/span> Log4j 鐨?/span> Log 綰綍鏂瑰紡榪涜閰嶇疆銆?/span>

濡傛灉鍦ㄥ悓涓涓?/span> APPLICATION 瀵圭浉鍚屽悕縐扮殑 Logger 榪涜璋冪敤錛岄偅涔堝彧浼氳繑鍥炰竴涓?/span> Logger 瀹炰緥銆?/span>

2銆?span style="FONT: 7pt 'Times New Roman'">聽 Log4J 浼氫笉浼氬緋葷粺鐨勬ц兘閫犳垚澶х殑褰卞搷錛?/span>

榪欐槸瀵?/span> Log4J 鎬ц兘鐨勪竴浜涙弿榪幫紝鐪嬫潵榪樻槸涓嶉敊鐨勶紝鍛靛懙錛屽湪璋冩暣涓涓?/span> Log 鐨勭瓑綰у氨鍙互浜嗐?/span>

On an AMD Duron clocked at 800Mhz running JDK 1.3.1, it costs about 5 nanoseconds to determine if a logging statement should be logged or not. Actual logging is also quite fast, ranging from 21 microseconds using the SimpleLayout, 37 microseconds using the TTCCLayout. The performance of the PatternLayout is almost as good as the dedicated layouts, except that it is much more flexible.

娉細瀵逛簬 Common Logging 鍜?/span> Log4J 鐨勫叧緋誨彲浠ュ弬瑙?/span> 錛堝叾瀹?/span> JCL 鏄竴涓鑼冿紝瀵逛竴浜?/span> Log 宸ュ叿榪涜浜嗗寘瑁咃紝鎴戜滑甯鎬細浣跨敤鍒扮殑鍏蜂綋瀹炵幇榪樻槸 Log4j 錛屽綋鐒朵篃鍙互浣跨敤鍏朵粬鐨勫疄鐜幫級

http://hedong.3322.org/archives/000316.html

鍙傝冭祫鏂欙細

http://www-128.ibm.com/developerworks/cn/java/l-log4j/index.html 浣跨敤 Log4J 榪涜鏃ュ織鎿嶄綔

http://zooo.51.net/heavyz_cs/notebook/log4j.html Log4J 瀛︿範絎旇錛堟帹鑽愶級

http://www.dingl.com/view.shtml?xh=485 log4j 閰嶇疆

http://hedong.3322.org/archives/000193.html 绔圭瑡鐐掕倝鐨?/span> Log4J 瀛︿範絎旇

http://forum.springside.org.cn/redirect.php?fid=3&tid=382&goto=nextoldset SpringSide 瀵?/span> Log4j 鐨勪嬌鐢ㄨ鐐?/span>



wqhtomcat 2006-12-05 22:28 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 奉贤区| 安化县| 许昌县| 五台县| 贺兰县| 阳信县| 万荣县| 驻马店市| 高雄县| 桂林市| 化德县| 南汇区| 泰顺县| 青州市| 平远县| 中江县| 贞丰县| 昭平县| 鹤山市| 兰考县| 五原县| 青铜峡市| 佛坪县| 英山县| 保定市| 拉孜县| 祁门县| 林周县| 诏安县| 道真| 太湖县| 金堂县| 威宁| 启东市| 彭山县| 贵南县| 额济纳旗| 安陆市| 合江县| 岑巩县| 工布江达县|