I could use some direction / suggestions on where to begin a debug / logging library.
Basically instead of
mysql_query($sql) or die('query failed '.mysql_error());
and anywhere else where mistakes can happen I want that event logged (in detail) to disk return 0 to the calling function and let the application deal with what it wants to tell the user / how to crash....
Specifically any articles, tutorials or libraries that already do this type of thing would be most appreciated.