{"id":62,"date":"2007-02-09T14:22:17","date_gmt":"2007-02-09T06:22:17","guid":{"rendered":"https:\/\/lifeparty.idv.tw\/blog\/archives\/62"},"modified":"2007-04-04T09:59:10","modified_gmt":"2007-04-04T01:59:10","slug":"%e8%ae%93-application-log-%e6%9b%b4%e5%ae%b9%e6%98%93%e5%af%a6%e7%8f%be","status":"publish","type":"post","link":"https:\/\/lifeparty.idv.tw\/blog\/archives\/62","title":{"rendered":"\u8b93 Application Log \u66f4\u5bb9\u6613\u5be6\u73fe"},"content":{"rendered":"<p>\u770b\u4e86<a href=\"http:\/\/jonathanspeaking.blogspot.com\">\u55b2\u54ea\u6851<\/a>\u5b78\u9577\u5beb\u7684<a href=\"http:\/\/jonathanspeaking.blogspot.com\/2007\/02\/jonathans-rule-of-thumb-in-program-log.html\">\u3008Rule of Thumb in Program Log\u3009<\/a>\uff0c\u4ed6\u8aaa\uff1a<\/p>\n<blockquote><p>\u7a0b\u5f0f Log \u7684\u597d\u58de\uff0c\u8207\u8edf\u9ad4\u958b\u767c\u9031\u671f\u9577\u77ed\u6709\u95dc\uff0c\u4e5f\u8207\u8edf\u9ad4\u7dad\u8b77\u6210\u672c\u6709\u95dc\u3002<\/p><\/blockquote>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Data_logging\">Log<\/a> \u771f\u7684\u5f88\u91cd\u8981\uff0c\u4f46\u7ad9\u5728 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Software_architect\">architect<\/a> \u7684\u89d2\u5ea6\u601d\u8003\u554f\u984c\uff0c\u5fc5\u9808\u8003\u616e<a href=\"http:\/\/en.wikipedia.org\/wiki\/IEEE_1471\">\u591a\u91cd\u89c0\u9ede<\/a>\uff1b\u6240\u4ee5\uff0c\u6211\u6703\u601d\u8003\u958b\u767c\u4eba\u54e1\u4e0d\u5beb Log \u7684\u554f\u984c\u662f<a href=\"http:\/\/www.books.com.tw\/exep\/prod\/booksfile.php?item=0010294910\">\u52d5\u6a5f\u554f\u984c\u9084\u662f\u80fd\u529b\u554f\u984c<\/a>\u5462\uff1f<\/p>\n<p>\u5982\u679c\u662f\u52d5\u6a5f\u554f\u984c\uff0c\u6211\u60f3\u5b78\u9577\u7684\u4e00\u756a\u8a71\u53ef\u4ee5\u6fc0\u52f5\u958b\u767c\u8005\uff0c\u7136\u800c\u5982\u679c\u4e0d\u55ae\u662f\u52d5\u6a5f\u554f\u984c\uff0c\u6709\u6642\u5019\u6c92\u6709\u52d5\u6a5f\u662f\u56e0\u70ba\u80fd\u529b\u554f\u984c\u6240\u5c0e\u81f4\u7684\u5462\uff1f<\/p>\n<blockquote><p>\u300c\u6211\u4e5f\u60f3\u5beb Log \u5440\uff0c\u53ef\u662f\u6642\u7a0b\u90a3\u9ebc\u8d95\uff0c\u5beb Log \u6703\u589e\u52a0\u6211\u5011\u7684\u5de5\u4f5c\u91cf\uff0cLog \u53ef\u4ee5\u7b49\u4ee5\u5f8c\u8981 Debug \u7684\u6642\u5019\u518d\u5beb\uff0c\u5148\u628a\u529f\u80fd\u5beb\u51fa\u4f86\u6bd4\u8f03\u91cd\u8981\uff01\u300d<\/p><\/blockquote>\n<p>\u958b\u767c\u8005\u7684\u8003\u91cf\u4e5f\u6709\u9053\u7406\uff0c\u8981\u89e3\u6c7a\u9019\u500b\u554f\u984c\uff0c<strong>\u6211\u5011\u61c9\u8a72\u60f3\u8fa6\u6cd5\u8b93 Application Log \u66f4\u5bb9\u6613\u5be6\u73fe<\/strong>\u3002<\/p>\n<p><!--more--> \u4f9d\u64da<a href=\"http:\/\/en.wikipedia.org\/wiki\/Separation_of_concerns\">\u95dc\u6ce8\u9ede\u5206\u96e2<\/a>\u7684\u539f\u5247\uff0cLog \u8207 Business Logic \u662f\u5c6c\u65bc\u4e0d\u540c\u7684<a href=\"http:\/\/en.wikipedia.org\/wiki\/Concern_%28computer_science%29\">\u95dc\u6ce8\u9ede<\/a>\uff0c\u524d\u8005\u5c6c\u65bc\u7cfb\u7d71\u670d\u52d9\uff0c\u800c\u5f8c\u8005\u624d\u662f\u696d\u52d9\u529f\u80fd\uff0c\u8981\u66f4\u6709\u6548\u7387\u5730\u8655\u7406\u7cfb\u7d71\u7684\u8907\u96dc\u5ea6\uff0c\u9019\u5169\u7a2e\u4e0d\u540c\u89c0\u9ede\u662f\u4e0d\u8a72\u6df7\u6dc6\u5728\u4e00\u8d77\u7684\uff0c\u6240\u4ee5\u5229\u7528 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Aspect-oriented_programming\" title=\"aspect-oriented programming\">AOP<\/a> \u7684\u624b\u6cd5\uff0c\u6211\u5011\u53ef\u4ee5\u628a\u50cf Log \u9019\u7a2e\u7684\u7cfb\u7d71\u670d\u52d9\u7528<a href=\"http:\/\/en.wikipedia.org\/wiki\/Cross-cutting_concern\" title=\"crosscutting concerns\">\u6a2a\u5207\u95dc\u6ce8\u9ede<\/a>\u628a\u5b83\u9023\u63a5\u5230<a href=\"http:\/\/en.wikipedia.org\/wiki\/Core_concern\" title=\"core concern\">\u4e3b\u8981\u95dc\u6ce8\u9ede<\/a>\u4ea6\u5373\u4e3b\u8981\u7684 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Business_Logic\">Business Logic<\/a> \u529f\u80fd\u9762\uff0d\u5b8c\u5168\u4ee5<a href=\"http:\/\/en.wikipedia.org\/wiki\/OOAD\">\u7269\u4ef6\u5c0e\u5411\u8a2d\u8a08\u7406\u5ff5<\/a>\u6240\u8a2d\u8a08\u7684\u7a0b\u5f0f\u6216\u6a21\u7d44\u3002<\/p>\n<p>\u63a1\u7528\u9019\u7a2e\u67b6\u69cb\u8a2d\u8a08\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u4e0d\u7528\u53bb\u7406\u6703\u7cfb\u7d71\u5c64\u9762\u7684\u554f\u984c\uff0c\u56e0\u70ba\u5b83\u5011\u662f\u7531\u5176\u5b83\u7684\u95dc\u6ce8\u9ede\u6240\u8ca0\u8cac\uff0c<a href=\"http:\/\/www.springframework.org\/\">springframework<\/a> \u4ee5 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Proxy_design_pattern\">proxy<\/a> \u5be6\u4f5c AOP \u6a5f\u5236\uff0c\u53ea\u8981\u5b9a\u7fa9\u597d\u4e3b\u8981\u95dc\u6ce8\u9ede\u754c\u9762\uff0c\u5c31\u53ef\u4ee5\u4efb\u610f\u52a0\u5165\u6216\u79fb\u9664\u6240\u9700\u8981\u7684\u6a2a\u5207\u95dc\u6ce8\u9ede\uff0d\u800c\u6a2a\u5207\u95dc\u6ce8\u9ede\u662f\u53ef\u4ee5\u88ab\u91cd\u8986\u4f7f\u7528\u7684\uff0c\u5b83\u5011\u662f\u7cfb\u7d71\u7684\u7684<a href=\"http:\/\/william.cswiz.org\/blog\/archives\/2006-05-08\/code-reading\">\u5171\u4eab\u5143\u4ef6<\/a>\u3002<\/p>\n<p>\u60f3\u8fa6\u6cd5\u8b93\u5c0d\u65b9\u5bb9\u6613\u505a\u5230\uff0c\u624d\u80fd\u771f\u6b63\u5730\u767c\u63ee<a href=\"https:\/\/lifeparty.idv.tw\/blog\/archives\/44\">\u5718\u968a\u7d9c\u6548<\/a>\uff0c\u6240\u4ee5\u5c0d\u7cfb\u7d71\u9762\u505a\u9019\u6a23\u7684\u95dc\u7167\uff0c\u958b\u767c\u8005\u5c31\u53ef\u4ee5\u66f4\u5c08\u6ce8\u65bc\u696d\u52d9\u908f\u8f2f\uff0c\u4e0d\u53d7\u7cfb\u7d71\u9762\u7684\u554f\u984c\u6240\u5e72\u64fe\uff0c\u800c\u7cfb\u7d71\u7684\u5782\u76f4\u54c1\u8cea\u4e5f\u4e0d\u6703\u6253\u6298\u6263\uff0c\u56e0\u70ba\u6211\u5011\u53ef\u4ee5\u627e\u5c0d\u7cfb\u7d71\u9762\u719f\u6089\u7684\u6280\u8853\u4eba\u54e1\u4f86\u5be6\u4f5c\u5b83\u5011\uff0c\u9019\u5c31\u662f<a href=\"http:\/\/zh.wikipedia.org\/wiki\/%E6%98%93%E7%BB%8F\">\u300a\u6613\u7d93\u300b<\/a>\u6240\u8aaa\u7684\u300c\u672c\u4e4e\u5929\u8005\u89aa\u4e0a\uff0c\u672c\u4e4e\u5730\u8005\u89aa\u4e0b\u300d\u7684\u9053\u7406\uff0c\u8b93\u842c\u7269\u5404\u5b89\u5176\u4f4d\u5440\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u770b\u4e86\u55b2\u54ea\u6851\u5b78\u9577\u5beb\u7684\u3008Rule of Thumb in Program Log\u3009\uff0c &hellip; <a href=\"https:\/\/lifeparty.idv.tw\/blog\/archives\/62\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,7,10,19,3],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-24","category-7","category-10","category-19","category-3"],"_links":{"self":[{"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":0,"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lifeparty.idv.tw\/blog\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}