private function validateLogLevel($level)
{
$map = $this->logger->getLogLevelMap();
$level = (string) $level;
if (isset($map[$level]) || isset(array_flip($map)[strtoupper($level)])) {
return true;
}
throw new InvalidArgumentException("Severity level '{$level}' is not defined.");
}