diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-04-10 10:10:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-04-10 10:10:27 +0000 |
commit | 07e6bdcdfe3273e6a17940c2ba12d2c8e0e878d1 (patch) | |
tree | 377b3a08b74f828e1ac45ad130886e82eccc29a4 /modules/system/system.install | |
parent | ded653fbbd3d8123e5e4ee5a7bd0336519201e61 (diff) | |
download | brdo-07e6bdcdfe3273e6a17940c2ba12d2c8e0e878d1.tar.gz brdo-07e6bdcdfe3273e6a17940c2ba12d2c8e0e878d1.tar.bz2 |
- Patch #63881 by kbahey and jakeg: improved Drupal's logging functionality. Added support for external loggers, and included a small syslog module into core.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 72b631a6e..06ad4d98c 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -603,21 +603,6 @@ function system_install() { PRIMARY KEY (vid, type) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ "); - db_query("CREATE TABLE {watchdog} ( - wid int NOT NULL auto_increment, - uid int NOT NULL default '0', - type varchar(16) NOT NULL default '', - message longtext NOT NULL, - severity tinyint unsigned NOT NULL default '0', - link varchar(255) NOT NULL default '', - location text NOT NULL, - referer varchar(128) NOT NULL default '', - hostname varchar(128) NOT NULL default '', - timestamp int NOT NULL default '0', - PRIMARY KEY (wid), - KEY (type) - ) /*!40100 DEFAULT CHARACTER SET UTF8 */ "); - break; case 'pgsql': /* create unsigned types */ @@ -1089,20 +1074,6 @@ function system_install() { PRIMARY KEY (vid, type) )"); - db_query("CREATE TABLE {watchdog} ( - wid serial, - uid int NOT NULL default '0', - type varchar(16) NOT NULL default '', - message text NOT NULL, - severity smallint_unsigned NOT NULL default '0', - link varchar(255) NOT NULL default '', - location text NOT NULL default '', - referer varchar(128) NOT NULL default '', - hostname varchar(128) NOT NULL default '', - timestamp int NOT NULL default '0', - PRIMARY KEY (wid) - )"); - db_query("CREATE INDEX {watchdog}_type_idx ON {watchdog} (type)"); break; } @@ -3724,6 +3695,17 @@ function system_update_2006() { } /** + * Change the severity column in the watchdog table to the new values. + */ +function system_update_2007() { + $ret = array(); + $ret[] = update_sql("UPDATE {watchdog} SET severity = %d WHERE severity = 0", WATCHDOG_NOTICE); + $ret[] = update_sql("UPDATE {watchdog} SET severity = %d WHERE severity = 1", WATCHDOG_WARNING); + $ret[] = update_sql("UPDATE {watchdog} SET severity = %d WHERE severity = 2", WATCHDOG_ERROR); + return $ret; +} + +/** * @} End of "defgroup updates-5.0-to-x.x" * The next series of updates should start at 3000. */ |