protected function checkLevel($level)
    {
        $cfgLevel = $this->registry->get(
            'level', self::DEFAULT_LEVEL
        );
        if (is_numeric($cfgLevel)) {
            $cfgLevel = (int)$cfgLevel;
        } else if (
            is_string($cfgLevel) &&
            preg_match('/^[A-Z_&|^ ]+$/', $cfgLevel)
        ) {
            $cfgLevel = eval(sprintf("return %s;", $cfgLevel));
        } else {
            throw new \RuntimeException(sprintf(
                "Invalid log level '%s' passed!", $cfgLevel
            ));
        }
        $result = (bool)($cfgLevel & $level);

        return $result;
    }