{"id":1435,"date":"2018-01-19T19:22:50","date_gmt":"2018-01-19T19:22:50","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/file-based-custom-logging\/"},"modified":"2018-01-19T19:24:47","modified_gmt":"2018-01-19T19:24:47","slug":"file-based-custom-logging","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/file-based-custom-logging\/","title":{"rendered":"File based, custom logging"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By John Starkey<\/div>\n<div class=\"\">on September 30, 2002<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\">\n<div class=\"articlePara\">\nIn my opinion, the best thing about working in the development phase is the liberty to throw<br \/>\nyour errors to the browser, without too many worries of prying eyes. Once your project is live,<br \/>\nhowever, these errors can be very risky business and naturally they should be supressed. This<br \/>\ncarries with it the disadvantage of complicating the debugging process if something goes wrong.<br \/>\nOne great way to suppress these demons, without losing any valuable information, is to log your<br \/>\nerrors to a private file on the server.<\/div>\n<div class=\"articlePara\">\nIn this article I will show you a very basic way of logging to your own file using PHP&#8217;s logging<br \/>\nfunctions. It is intended only as a start and by no means a complete thesis on logging as a whole.<br \/>\nI intend to continue the discussion in follow up articles as time allows, so please check back often.<\/div>\n<\/div>\n<p><\/p>\n<div style=\"float: left; padding:15px; color:#17AAF3\">\n<div style=\"background-color:#B6E5FC; font-size:16px; margin-top:1px; padding:1px 4px 1px 4px; color:#000; font-style:bold; float:left;\">1<\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"starkey200209304658.html?page=2\">2<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"starkey200209309ba9.html?page=3\">3<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"starkey20020930fdb0.html?page=4\">4<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"starkey20020930af4d.html?page=5\">5<\/a> <\/div>\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"starkey200209304658.html?page=2\">Next Page \u00bb<\/a><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In my opinion, the best thing about working in the development phase is the liberty to throw your errors to the browser, without too many worries<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1435","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=1435"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1435\/revisions"}],"predecessor-version":[{"id":3293,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1435\/revisions\/3293"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=1435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=1435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=1435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}