class Convert in Flysystem 8
Same name and namespace in other branches
- 3.x src/Logger/Convert.php \Drupal\flysystem\Logger\Convert
- 2.0.x src/Logger/Convert.php \Drupal\flysystem\Logger\Convert
- 3.0.x src/Logger/Convert.php \Drupal\flysystem\Logger\Convert
Converts various log levels.
Hierarchy
- class \Drupal\flysystem\Logger\Convert
Expanded class hierarchy of Convert
2 files declare their use of Convert
- ConvertTest.php in tests/
src/ Unit/ Logger/ ConvertTest.php - flysystem.install in ./
flysystem.install - Install, update and uninstall functions for the flysystem module.
File
- src/
Logger/ Convert.php, line 10
Namespace
Drupal\flysystem\LoggerView source
class Convert {
/**
* Coverts from RFC 5424 to requirements error constants.
*
* @param int $level
* The RFC log value.
*
* @return int
* The requirements error value.
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Convert:: |
public static | function | Coverts from RFC 5424 to requirements error constants. |