diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-05-19 13:41:52 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-05-19 13:41:52 +0000 |
commit | 34af2a3a8e1f7b9fa6a9797f6d501bc3f2c1fd84 (patch) | |
tree | 22be017f1a80cf81c772f6bb5d7ca69179535214 /modules/watchdog.module | |
parent | c5f9c709fd7372eaa301c6f4a4487908cb34d72b (diff) | |
download | brdo-34af2a3a8e1f7b9fa6a9797f6d501bc3f2c1fd84.tar.gz brdo-34af2a3a8e1f7b9fa6a9797f6d501bc3f2c1fd84.tar.bz2 |
CHANGES:
- Rewrote the cron system. Removed cron.module and moved all cron
related options to settings.module. Cron was a confusing thing:
it has been made simpler both in terms of code and configuration.
+ You had to rehash your modules to make the cron show up in
the list. This is no longer required.
+ You couldn't tell what cron "watchdog" or cron "story" were
up to. Instead, we now display a clear description message
for every cron involved.
+ The user interface of setting.module - and the admin section
in general, looks a bit ackward but I couldn't care less and
don't want to see this improve at the time being.
- Improved setting.module:
+ Now uses variable_set().
+ Added some help and documentaition on how to setup cron.
- Improved ./export.
- Updated CHANGELOG.
TODO:
- I'm now going to look into UnConeD's question with regard to
check_output() and $theme->node(), as well as the filter and
macro stuff. I'll probably be fine-tuning setting.module a
bit more on my way.
Diffstat (limited to 'modules/watchdog.module')
-rw-r--r-- | modules/watchdog.module | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/watchdog.module b/modules/watchdog.module index a3d04b36d..8397da666 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -3,12 +3,18 @@ function watchdog_help() { ?> <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> - <P>To ease administration, the watchdog will automatically remove old logs.</P> + <P>To ease administration, the watchdog will automatically discard old log entries.</P> <?php } +function watchdog_conf() { + $period = array(3600 => format_interval(3600), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200)); + $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.")); + return $output; +} + function watchdog_cron() { - db_query("DELETE FROM watchdog WHERE ". time() ." - timestamp > ". variable_get(watchdog_clear, "302400")); + db_query("DELETE FROM watchdog WHERE ". time() ." - timestamp > ". variable_get("watchdog_clear", 604800)); } function watchdog_overview() { |