public static function Convert::rfcToHookRequirements in Flysystem 8
Same name and namespace in other branches
- 3.x src/Logger/Convert.php \Drupal\flysystem\Logger\Convert::rfcToHookRequirements()
- 2.0.x src/Logger/Convert.php \Drupal\flysystem\Logger\Convert::rfcToHookRequirements()
- 3.0.x src/Logger/Convert.php \Drupal\flysystem\Logger\Convert::rfcToHookRequirements()
Coverts from RFC 5424 to requirements error constants.
Parameters
int $level: The RFC log value.
Return value
int The requirements error value.
2 calls to Convert::rfcToHookRequirements()
- ConvertTest::test in tests/
src/ Unit/ Logger/ ConvertTest.php - @covers ::rfcToHookRequirements
- __flysystem_call_ensure in ./
flysystem.install - Checks the state of existing configuratio.
File
- src/
Logger/ Convert.php, line 21
Class
- Convert
- Converts various log levels.
Namespace
Drupal\flysystem\LoggerCode
public static function rfcToHookRequirements($level) {
if ($level <= RfcLogLevel::ERROR) {
return REQUIREMENT_ERROR;
}
if ($level == RfcLogLevel::WARNING) {
return REQUIREMENT_WARNING;
}
if ($level == RfcLogLevel::NOTICE || $level == RfcLogLevel::INFO) {
return REQUIREMENT_INFO;
}
return REQUIREMENT_OK;
}