<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1029426" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1029426</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/error-code-recording#comment-1172083</link>
    <description> &lt;p&gt;Hi, Thanks for the that. I want to record any errors which the user may find for example some page on my site my not have &quot;Dont show&quot; if recordset is empty. So if the user has deleted data then returns to the page which needs the data, it will show a big ever and i will need to fix the problem. but if no body tells me, then its hard for me to fix.&lt;/p&gt;
&lt;p&gt;So i&#039;m looking for something that will record in to a database, txt file anything.&lt;/p&gt;
 </description>
     <pubDate>Mon, 30 May 2005 18:23:18 +0000</pubDate>
 <dc:creator>dhotchin</dc:creator>
 <guid isPermaLink="false">comment 1172083 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/error-code-recording#comment-1172073</link>
    <description> &lt;p&gt;What type of error? for what?&lt;/p&gt;
&lt;p&gt;For the service I program, every page has logging, not to a database, but to flat text files, stored in folders of the username (or &quot;_NON_USER_&quot;) and then in that folder, named in the format YYYY-MM-DD_HH-MM-SS.log so they can be sorted&lt;/p&gt;
&lt;p&gt;Inside, the first thing it logs is server information i need (refering page, url requested, ip address, browser type, etc).&lt;/p&gt;
&lt;p&gt;Then each line of data contains a line number, file name, and whatever i choose to output (being a variable value, or a comment to let me know where program flow went)&lt;/p&gt;
&lt;p&gt;my functions for doing database calls include code to log all SQL as it is given to the server right before it does it and the status right afterwards.&lt;/p&gt;
&lt;p&gt;this really makes a large program (my main file, not counting any included modules, is over 750 lines long) a lot easier to follow the flow when something goes wrong.&lt;/p&gt;
&lt;p&gt;If you are using PHP, you can use the following variables to help log the info:&lt;/p&gt;
&lt;p&gt;__LINE__ is the current line number (ie. echo &quot;You are on line #&quot; . __LINE__ . &quot;\n&quot;; )&lt;br /&gt;
__FILE__ is the current file (helpful when you have several included files)&lt;/p&gt;
&lt;p&gt;note, if you do like me, and have the debug set up in a function, you need to PASS these values to the function, else they will always show the line number/filename of the line in the function.&lt;/p&gt;
&lt;p&gt;I do things like the following to see what $myArray[&#039;test&#039;] is:&lt;/p&gt;
&lt;p&gt;debugOut (__FILE__,__LINE__,&quot;myArray[test]=&quot; . $myArray[&#039;test&#039;]);&lt;/p&gt;
&lt;p&gt;Note that it is also helpful to write a function to dump the values of an entire array (similiar to doing a print_r($array) )&lt;/p&gt;
&lt;p&gt;I will have to clean up my debugging module and post it here some day&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Mon, 30 May 2005 17:23:23 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1172073 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
