"watchdog_help", "cron" => "watchdog_cron", "conf" => "watchdog_conf", "admin" => "watchdog_admin"); function watchdog_help() { ?>

The watchdog module monitors your website, captures system events in a log and records them to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of events recorded during operation and contains usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.

To ease administration, the watchdog will automatically remove old logs.

"id DESC", "username" => "user", "location" => "location", "message" => "message DESC", "level" => "level DESC"); // Perform query: $result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id ORDER BY l.$fields[$order]"); // Generate output: $output .= "\n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; while ($watchdog = db_fetch_object($result)) { $output .= " level] ."\">\n"; } $output .= "
\n"; $output .= "
\n"; $output .= " \n"; $output .= " \n"; $output .= "
\n"; $output .= "
datemessageuseroperations
". format_date($watchdog->timestamp) ."". substr(check_output($watchdog->message), 0, 44) ."". format_username($watchdog->userid) ."id\">details
\n"; print $output; } function watchdog_view($id) { $result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id WHERE l.id = '$id'"); if ($watchdog = db_fetch_object($result)) { $output .= "\n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= "
Level:". check_output($watchdog->level) ."
Date:". format_date($watchdog->timestamp, "large") ."
User:". format_username($watchdog->userid) ."
Location:". check_output($watchdog->location). "
Message:". check_output($watchdog->message) ."
Hostname:". check_output($watchdog->hostname) ."
\n"; print $output; } } function watchdog_conf() { global $conf; $rate = array(1 => "maximum 1 every second", 5 => "maximum 1 every 5 seconds", 15 => "maximum 1 every 15 seconds", 30 => "maximum 1 every 30 seconds", 60 => "maximum 1 every minute", 300 => "maximum 1 every 5 minutes", 900 => "maximum 1 every 15 minutes", 1800 => "maximum 1 every 30 minutes", 3600 => "maximum 1 every hour", 21600 => "maximum 1 every 6 hour", 43200 => "maximum 1 every 12 hour"); $output .= "Maximum node rate:
\n"; foreach ($rate as $key=>$value) $options1 .= " \n"; $output .= "
\n"; $output .= "The maximum submission rate for nodes. Its purpose is to stop denial of service attacks.

\n"; $output .= "Maximum comment rate:
\n"; foreach ($rate as $key=>$value) $options2 .= " \n"; $output .= "