Modify query_error() to log errors to a database table instead of displaying them on the screen. This should
let us more easily debug difficult or intermittent issues that users may not report. Add a cron to report logged errors to appdb admins every night. Implement some basic unit tests for the new error logging code
This commit is contained in:
@@ -30,3 +30,5 @@ mysql -p -u root < buglinks.sql
|
||||
echo Adding monitors
|
||||
mysql -p -u root < monitors.sql
|
||||
|
||||
echo Creating error logging tables
|
||||
mysql -p -u root < error_log.sql
|
||||
|
||||
14
tables/error_log.sql
Normal file
14
tables/error_log.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
use apidb;
|
||||
|
||||
drop table if exists error_log;
|
||||
|
||||
create table error_log (
|
||||
id int not null auto_increment,
|
||||
submitTime datetime,
|
||||
userid int not null default '0',
|
||||
type enum('sql_error', 'general_error'),
|
||||
log_text text,
|
||||
request_text text,
|
||||
deleted bool,
|
||||
key(id)
|
||||
);
|
||||
Reference in New Issue
Block a user