dblog_cron

6 dblog.module dblog_cron()
7 dblog.module dblog_cron()
8 dblog.module dblog_cron()

Implementation of hook_cron().

Remove expired log messages and flood control events.

File

modules/dblog/dblog.module, line 102
System monitoring and logging for administrators.

Code

function dblog_cron() {
  // Cleanup the watchdog table
  $max = db_result(db_query('SELECT MAX(wid) FROM {watchdog}'));
  db_query('DELETE FROM {watchdog} WHERE wid <= %d', $max - variable_get('dblog_row_limit', 1000));
}
Login or register to post comments