summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));
}
}