{"id":25,"date":"2007-12-26T01:54:23","date_gmt":"2007-12-25T17:54:23","guid":{"rendered":"http:\/\/amjet.dyndns.biz\/blog\/IT\/?p=25"},"modified":"2013-03-01T19:50:47","modified_gmt":"2013-03-01T11:50:47","slug":"php-%e7%a8%8b%e5%bc%8f%e9%96%8b%e7%99%bc%e7%9a%84-log-framework","status":"publish","type":"post","link":"https:\/\/blog.amjet.biz\/IT\/?p=25","title":{"rendered":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework"},"content":{"rendered":"<p>log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<p>\u5b89\u88dd\u90e8\u4efd\uff1a<\/p>\n<p>Fedora 8 \u53ea\u8981 &#8216;yum install php-pear-Log&#8217; \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 &#8216;pear install Log&#8217; \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002<\/p>\n<p>Coding\uff1a<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b<\/p>\n<p>&lt;?php<\/p>\n<p>require_once &#8216;Log.php&#8217;;<\/p>\n<p>$logger=&amp;Log::factory(&#8216;file&#8217;,&#8217;myap.log&#8217;,&#8217;demo.php&#8217;);<br \/>\n$logger-&gt;log(&#8216;application start&#8217;,PEAR_LOG_NOTICE);<br \/>\n$logger-&gt;log(&#8216;application finished&#8217;,PEAR_LOG_NOTICE);<\/p>\n<p>?&gt;<\/p>\n<p>\u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b<\/p>\n<p>Dec 26 01:11:22 demo.php [notice] application start<br \/>\nDec 26 01:11:22 demo.php [notice] application finished<\/p>\n<p>\u652f\u63f4\u7684 log level \u5305\u62ec<\/p>\n<p>PEAR_LOG_EMERG<\/p>\n<p>PEAR_LOG_ALERT<\/p>\n<p>PEAR_LOG_CRIT<\/p>\n<p>PEAR_LOG_ERR<\/p>\n<p>PEAR_LOG_WARNING<\/p>\n<p>PEAR_LOG_NOTICE<\/p>\n<p>PEAR_LOG_INFO<\/p>\n<p>PEAR_LOG_DEBUG<\/p>\n<p><strong>[ratings]<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 &#8216;yum install php-pear-Log&#8217; \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 &#8216;pear install Log&#8217; \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b &lt;?php require_once &#8216;Log.php&#8217;; $logger=&amp;Log::factory(&#8216;file&#8217;,&#8217;myap.log&#8217;,&#8217;demo.php&#8217;); $logger-&gt;log(&#8216;application start&#8217;,PEAR_LOG_NOTICE); $logger-&gt;log(&#8216;application finished&#8217;,PEAR_LOG_NOTICE); ?&gt; \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[91,137],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-php","tag-log","tag-php"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 &#039;yum install php-pear-Log&#039; \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 &#039;pear install Log&#039; \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"vincent\"\/>\n\t<meta name=\"keywords\" content=\"log,php\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/blog.amjet.biz\/IT\/?p=25\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"AmJet IT Blog | for IT professionals\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 &#039;yum install php-pear-Log&#039; \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 &#039;pear install Log&#039; \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/blog.amjet.biz\/IT\/?p=25\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-12-25T17:54:23+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-03-01T11:50:47+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 &#039;yum install php-pear-Log&#039; \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 &#039;pear install Log&#039; \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#article\",\"name\":\"PHP \\u7a0b\\u5f0f\\u958b\\u767c\\u7684 Log framework | AmJet IT Blog\",\"headline\":\"PHP \\u7a0b\\u5f0f\\u958b\\u767c\\u7684 Log framework\",\"author\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/#organization\"},\"datePublished\":\"2007-12-26T01:54:23+08:00\",\"dateModified\":\"2013-03-01T19:50:47+08:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#webpage\"},\"articleSection\":\"PHP, Log, PHP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=5#listItem\",\"name\":\"Developer\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=5#listItem\",\"position\":2,\"name\":\"Developer\",\"item\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=5\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=10#listItem\",\"name\":\"PHP\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=10#listItem\",\"position\":3,\"name\":\"PHP\",\"item\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=10\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#listItem\",\"name\":\"PHP \\u7a0b\\u5f0f\\u958b\\u767c\\u7684 Log framework\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=5#listItem\",\"name\":\"Developer\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#listItem\",\"position\":4,\"name\":\"PHP \\u7a0b\\u5f0f\\u958b\\u767c\\u7684 Log framework\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?cat=10#listItem\",\"name\":\"PHP\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/#organization\",\"name\":\"AmJet Digital\",\"description\":\"for IT professionals\",\"url\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?author=2#author\",\"url\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?author=2\",\"name\":\"vincent\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8c6bcd6e8e7e1c9bce74184354da4a5c294d71657c7abc161841c4799d1b1a46?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"vincent\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#webpage\",\"url\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25\",\"name\":\"PHP \\u7a0b\\u5f0f\\u958b\\u767c\\u7684 Log framework | AmJet IT Blog\",\"description\":\"log4j \\u5e7e\\u4e4e\\u5df2\\u7d93\\u662f java \\u5c08\\u6848\\u958b\\u767c\\u7684\\u6a19\\u6e96\\u914d\\u5099\\u4e86\\uff0c\\u5728 pear \\u7db2\\u7ad9\\u641c\\u5c0b\\u4e86\\u4e00\\u4e0b\\uff0c\\u627e\\u5230\\u4e86\\u4e00\\u500b logging \\u7684\\u5957\\u4ef6\\uff0c\\u5b89\\u88dd\\u5bb9\\u6613\\uff0c\\u6574\\u5408\\u4e5f\\u975e\\u5e38\\u65b9\\u4fbf\\u3002 \\u5b89\\u88dd\\u90e8\\u4efd\\uff1a Fedora 8 \\u53ea\\u8981 'yum install php-pear-Log' \\u5c31\\u6703\\u81ea\\u52d5\\u5b89\\u88dd\\u597d\\u6240\\u9700\\u7684\\u5957\\u4ef6\\uff0cWindows \\u6216\\u5176\\u4ed6\\u5e73\\u53f0\\u5982\\u679c\\u5df2\\u7d93\\u5b89\\u88dd\\u597d PHP\\u3001PEAR \\u5957\\u4ef6\\uff0c\\u61c9\\u8a72\\u53ea\\u8981 'pear install Log' \\u5c31\\u6703\\u81ea\\u52d5\\u4e0b\\u8f09\\u4e26\\u5b89\\u88dd\\u597d\\u5957\\u4ef6\\uff0cwindows \\u7684 xampp \\u662f\\u9019\\u6a23\\u5b89\\u88dd\\u597d\\u7684\\u3002 Coding\\uff1a \\u4ee5\\u4e0b\\u662f\\u4e00\\u5c0f\\u6bb5\\u7c21\\u77ed\\u7684\\u7bc4\\u4f8b \\u5beb\\u9032 myap.log \\u6a94\\u7684 log \\u683c\\u5f0f\\u5982\\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?p=25#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/?author=2#author\"},\"datePublished\":\"2007-12-26T01:54:23+08:00\",\"dateModified\":\"2013-03-01T19:50:47+08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/#website\",\"url\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/\",\"name\":\"AmJet IT Blog\",\"description\":\"for IT professionals\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.amjet.biz\\\/IT\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog","description":"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 'yum install php-pear-Log' \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 'pear install Log' \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application","canonical_url":"https:\/\/blog.amjet.biz\/IT\/?p=25","robots":"max-image-preview:large","keywords":"log,php","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#article","name":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog","headline":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework","author":{"@id":"https:\/\/blog.amjet.biz\/IT\/?author=2#author"},"publisher":{"@id":"https:\/\/blog.amjet.biz\/IT\/#organization"},"datePublished":"2007-12-26T01:54:23+08:00","dateModified":"2013-03-01T19:50:47+08:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#webpage"},"isPartOf":{"@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#webpage"},"articleSection":"PHP, Log, PHP"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT#listItem","position":1,"name":"Home","item":"https:\/\/blog.amjet.biz\/IT","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?cat=5#listItem","name":"Developer"}},{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?cat=5#listItem","position":2,"name":"Developer","item":"https:\/\/blog.amjet.biz\/IT\/?cat=5","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?cat=10#listItem","name":"PHP"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?cat=10#listItem","position":3,"name":"PHP","item":"https:\/\/blog.amjet.biz\/IT\/?cat=10","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#listItem","name":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?cat=5#listItem","name":"Developer"}},{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#listItem","position":4,"name":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework","previousItem":{"@type":"ListItem","@id":"https:\/\/blog.amjet.biz\/IT\/?cat=10#listItem","name":"PHP"}}]},{"@type":"Organization","@id":"https:\/\/blog.amjet.biz\/IT\/#organization","name":"AmJet Digital","description":"for IT professionals","url":"https:\/\/blog.amjet.biz\/IT\/"},{"@type":"Person","@id":"https:\/\/blog.amjet.biz\/IT\/?author=2#author","url":"https:\/\/blog.amjet.biz\/IT\/?author=2","name":"vincent","image":{"@type":"ImageObject","@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/8c6bcd6e8e7e1c9bce74184354da4a5c294d71657c7abc161841c4799d1b1a46?s=96&d=mm&r=g","width":96,"height":96,"caption":"vincent"}},{"@type":"WebPage","@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#webpage","url":"https:\/\/blog.amjet.biz\/IT\/?p=25","name":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog","description":"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 'yum install php-pear-Log' \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 'pear install Log' \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/blog.amjet.biz\/IT\/#website"},"breadcrumb":{"@id":"https:\/\/blog.amjet.biz\/IT\/?p=25#breadcrumblist"},"author":{"@id":"https:\/\/blog.amjet.biz\/IT\/?author=2#author"},"creator":{"@id":"https:\/\/blog.amjet.biz\/IT\/?author=2#author"},"datePublished":"2007-12-26T01:54:23+08:00","dateModified":"2013-03-01T19:50:47+08:00"},{"@type":"WebSite","@id":"https:\/\/blog.amjet.biz\/IT\/#website","url":"https:\/\/blog.amjet.biz\/IT\/","name":"AmJet IT Blog","description":"for IT professionals","inLanguage":"en-US","publisher":{"@id":"https:\/\/blog.amjet.biz\/IT\/#organization"}}]},"og:locale":"en_US","og:site_name":"AmJet IT Blog | for IT professionals","og:type":"article","og:title":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog","og:description":"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 'yum install php-pear-Log' \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 'pear install Log' \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application","og:url":"https:\/\/blog.amjet.biz\/IT\/?p=25","article:published_time":"2007-12-25T17:54:23+00:00","article:modified_time":"2013-03-01T11:50:47+00:00","twitter:card":"summary","twitter:title":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework | AmJet IT Blog","twitter:description":"log4j \u5e7e\u4e4e\u5df2\u7d93\u662f java \u5c08\u6848\u958b\u767c\u7684\u6a19\u6e96\u914d\u5099\u4e86\uff0c\u5728 pear \u7db2\u7ad9\u641c\u5c0b\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u4e00\u500b logging \u7684\u5957\u4ef6\uff0c\u5b89\u88dd\u5bb9\u6613\uff0c\u6574\u5408\u4e5f\u975e\u5e38\u65b9\u4fbf\u3002 \u5b89\u88dd\u90e8\u4efd\uff1a Fedora 8 \u53ea\u8981 'yum install php-pear-Log' \u5c31\u6703\u81ea\u52d5\u5b89\u88dd\u597d\u6240\u9700\u7684\u5957\u4ef6\uff0cWindows \u6216\u5176\u4ed6\u5e73\u53f0\u5982\u679c\u5df2\u7d93\u5b89\u88dd\u597d PHP\u3001PEAR \u5957\u4ef6\uff0c\u61c9\u8a72\u53ea\u8981 'pear install Log' \u5c31\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u597d\u5957\u4ef6\uff0cwindows \u7684 xampp \u662f\u9019\u6a23\u5b89\u88dd\u597d\u7684\u3002 Coding\uff1a \u4ee5\u4e0b\u662f\u4e00\u5c0f\u6bb5\u7c21\u77ed\u7684\u7bc4\u4f8b \u5beb\u9032 myap.log \u6a94\u7684 log \u683c\u5f0f\u5982\u4e0b Dec 26 01:11:22 demo.php [notice] application start Dec 26 01:11:22 demo.php [notice] application"},"aioseo_meta_data":{"post_id":"25","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-23 23:27:43","updated":"2025-06-05 09:00:05","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.amjet.biz\/IT\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.amjet.biz\/IT\/?cat=5\" title=\"Developer\">Developer<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.amjet.biz\/IT\/?cat=10\" title=\"PHP\">PHP<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/blog.amjet.biz\/IT"},{"label":"Developer","link":"https:\/\/blog.amjet.biz\/IT\/?cat=5"},{"label":"PHP","link":"https:\/\/blog.amjet.biz\/IT\/?cat=10"},{"label":"PHP \u7a0b\u5f0f\u958b\u767c\u7684 Log framework","link":"https:\/\/blog.amjet.biz\/IT\/?p=25"}],"_links":{"self":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25"}],"version-history":[{"count":4,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/25\/revisions\/739"}],"wp:attachment":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}