Better logging of results.
Page 1 of 1

Author:  A_Hull [ Tue Jan 06, 2009 7:52 pm ]
Post subject:  Better logging of results.

admin_pc_add_2.php contains a lot of lines like..
$result = mysql_query($sql) or die ('Insert Failed: ' . mysql_error() . '<br />' . $sql);

Would it not make more sense to log an error to the error log and continue processing rather than simply have the page die.

If so, what do we think the best way to code this would be?

Also as each of the sections of this page are called, we could log (possibly only if we have set a verbose logging flag), and if they complete without error we could log.. (also only if we have set a verbose logging flag). This would give us a clearer indication of the progress of the auditing script and make debugging simpler.

Bear in mind that currently we throw back an error to a script which doesn't even read the error, so anything has to be an improvement.

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group