Automatic bug collection from PHP/apache server code -


It's painful to remove things from Apache error_log, do anyone have some better error tracking mechanisms? Something described in "", but for PHP / apache webapp

More specifically, some mechanisms to hook up errors that are inserted in some bug tracking software, perhaps some library / code Indicates which errors / warnings are collected and collects data that can be recorded in bug-tracking software. With the following bonus attributes:

  • Identifies duplicate worms.
  • If a bug leads to more than one error message, then it should be captured as a bug

You can specify your own custom PHP error handler here. Here's a simple example:

  function_log_error_handler ($ errno, $ str , $ File, $ line) {switch ($ errno) {case E_USER_ERROR: add_log ("PHP error", "error $ $ row $ $ line in line $ $: $ str", "deadly"); Exit (1); break; Case E_USER_WARNING: add_log ("PHP warning", "Warning $ $ line in line $ line: $ str", "warning"); break; Case E_USER_NOTICE: add_log ("PHP Notices", "Note $ $ line $ line line $ $: $ str", "note"); break; Do not make this next line inappropriate to catch the default: // // add_log ("PHP", "unknown error $ error $ $ line $ $ $: $ str", "note"); break; }} Function add_log ($ code, $ message, $ type = 'message', $ program = null) {// enter some emails like admin or in bug tracking software db} // ### log php errors To do #### set_error_handler ("log_error_handler");  

Comments