You are here

function _flysystem_convert_watchdog_to_requirements in Flysystem 7

Converts from watchdog to hook_requirements values.

Parameters

int $severity: The severity according to watchdog().

Return value

int An appropriate value for hook_requirements.

1 call to _flysystem_convert_watchdog_to_requirements()
flysystem_requirements in ./flysystem.install
Implements hook_requirements().

File

./flysystem.install, line 51
Install, update, enable hooks for flysystem.module.

Code

function _flysystem_convert_watchdog_to_requirements($severity) {
  if ($level <= WATCHDOG_ERROR) {
    return REQUIREMENT_ERROR;
  }
  if ($level == WATCHDOG_WARNING) {
    return REQUIREMENT_WARNING;
  }
  if ($level == WATCHDOG_NOTICE || $level == WATCHDOG_INFO) {
    return REQUIREMENT_INFO;
  }
  return REQUIREMENT_OK;
}