diff --git a/modules/throttle.module b/modules/throttle.module index e2bddf93a249f8a3502f48f73ead850f757fbdf0..dcf2e00d10a557cd64517d37adccdf64d7ddbfc1 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 e2bddf93a249f8a3502f48f73ead850f757fbdf0..dcf2e00d10a557cd64517d37adccdf64d7ddbfc1 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)); } }