<P>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.</P>
$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.";
menu_add("watchdog", "admin.php?mod=watchdog", "Display system events.", $help, "site monitoring", 1, 1);
menu_add("user messages", "admin.php?mod=watchdog&type=user", "Display system events", $help, "watchdog");
menu_add("regular messages", "admin.php?mod=watchdog&type=regular", "Display system events", $help, "watchdog");
menu_add("special messages", "admin.php?mod=watchdog&type=special", "Display system events", $help, "watchdog");
menu_add("warning messages", "admin.php?mod=watchdog&type=warning", "Display system events", $help, "watchdog");
menu_add("error messages", "admin.php?mod=watchdog&type=error", "Display system events", $help, "watchdog");
menu_add("httpd messages", "admin.php?mod=watchdog&type=httpd", "Display system events", $help, "watchdog");
$output .= form_select(t("Discard entries older than"), "watchdog_clear", variable_get("watchdog_clear", 604800), $period, t("The time watchdog entries should be kept. Older entries will be automatically discarded. Requires crontab."));
$result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000");