summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-22 06:18:21 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-22 06:18:21 +0000
commit5c415f739bcdc183e99f76e55509ab9485fb181e (patch)
treee20b1b222432c9b76f0b729416a662a3217f430f
parent18160f02e8bf9da9088ef54ee17472d1ad1afbc4 (diff)
downloadbrdo-5c415f739bcdc183e99f76e55509ab9485fb181e.tar.gz
brdo-5c415f739bcdc183e99f76e55509ab9485fb181e.tar.bz2
- Slightly improved the throttle watchdog messages.
-rw-r--r--modules/throttle.module6
-rw-r--r--modules/throttle/throttle.module6
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/throttle.module b/modules/throttle.module
index e2bddf93a..dcf2e00d1 100644
--- a/modules/throttle.module
+++ b/modules/throttle.module
@@ -166,14 +166,16 @@ function _throttle_update($hits) {
}
}
+ $type = $throttle_new > 2 ? 'warning' : 'regular';
+
// log the change
if ($throttle_new < $throttle) {
variable_set('throttle_level', $throttle - 1);
- watchdog('regular', "message: '$hits' hits in past minute; throttle decreased to level ". ($throttle - 1));
+ watchdog($type, "throttle: '$hits' hits in past minute; throttle decreased to level ". ($throttle - 1));
}
if ($throttle_new > $throttle) {
variable_set('throttle_level', $throttle + 1);
- watchdog('warning', "warning: '$hits' hits in past minute; throttle increased to level ". ($throttle + 1));
+ watchdog($type, "throttle: '$hits' hits in past minute; throttle increased to level ". ($throttle + 1));
}
}
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index e2bddf93a..dcf2e00d1 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -166,14 +166,16 @@ function _throttle_update($hits) {
}
}
+ $type = $throttle_new > 2 ? 'warning' : 'regular';
+
// log the change
if ($throttle_new < $throttle) {
variable_set('throttle_level', $throttle - 1);
- watchdog('regular', "message: '$hits' hits in past minute; throttle decreased to level ". ($throttle - 1));
+ watchdog($type, "throttle: '$hits' hits in past minute; throttle decreased to level ". ($throttle - 1));
}
if ($throttle_new > $throttle) {
variable_set('throttle_level', $throttle + 1);
- watchdog('warning', "warning: '$hits' hits in past minute; throttle increased to level ". ($throttle + 1));
+ watchdog($type, "throttle: '$hits' hits in past minute; throttle increased to level ". ($throttle + 1));
}
}