get instance of log priority

@param String $priority
@return LogPriorities
19351
public function logPrioriotyId($priority = 'medium')
    {
        $logPriority = LogPriorities::where('name', $priority)->first();
        if (is_null($logPriority)) {
            $logPriority = new LogPriorities(['name' => $priority]);
            $logPriority->save();
        }
        return $logPriority->id;
    }
720802
public function isValidLocationPriority($priority)
    {
        if ($priority === null) {
            return true;
        }

        return is_int($priority) && $priority >= self::MIN_LOCATION_PRIORITY && $priority <= self::MAX_LOCATION_PRIORITY;
    }
1150063
public function setPriority($priority)
    {
        if (! (is_float($priority) && $priority >= 0 && $priority <= 1)) {
            throw new Exception('Priority must be >=0.0 and <=1.0');
        }

        $this->priority = number_format($priority, 1);

        return $this;
    }
486294
protected function createQueue($priority)
    {
        if (!$this->queues[$priority]) {
            $config = $this->getOptions();
            $config['key'] = $this->intChannels[$priority];
            $this->queues[$priority] = new ShmMap($config);
        }

        return $this->queues[$priority];
    }
441351
public function setPriority($priority)
    {
        $oldPriority = $this->priority;
        $this->priority = $priority;
        if (!($this instanceof RunInterface && $this->hasStarted())
            && method_exists($this, 'dispatch')
            && $this instanceof PrioritisedInterface) {
            $this->dispatch(PriorityChangedEvent::CHANGED, new PriorityChangedEvent($this, $priority, $oldPriority));
        }
        return $this;
    }
535551
public function log($message, $priority, $extras = null)
    {
        if (null !== $this->getLogger()) {
            $this->getLogger()->log($message, $priority, $extras);
        }

        return $this;
    }
1329129
protected function getPriorityBefore(string $fixerClass): int
    {
        if (! is_a($fixerClass, FixerInterface::class, true)) {
            return 0;
        }

        /** @var FixerInterface $fixer */
        $fixer = (new ReflectionClass($fixerClass))->newInstanceWithoutConstructor();

        return $fixer->getPriority() + 5;
    }
19027
public function setPriority($priority)
    {
        if (!OptionsPriorities::isValid($priority)) {
            throw new InvalidOptionsException('priority is not valid, please refer to the documentation or use the constants of the class "OptionsPriorities"');
        }
        $this->priority = $priority;

        return $this;
    }
818707
function priorityToString($priority)
    {
        $levels = array(
            PEAR_LOG_EMERG   => 'emergency',
            PEAR_LOG_ALERT   => 'alert',
            PEAR_LOG_CRIT    => 'critical',
            PEAR_LOG_ERR     => 'error',
            PEAR_LOG_WARNING => 'warning',
            PEAR_LOG_NOTICE  => 'notice',
            PEAR_LOG_INFO    => 'info',
            PEAR_LOG_DEBUG   => 'debug'
        );

        return $levels[$priority];
    }
235988
public static function getInstance($logFile = 'static.log', $logDir = 'data/logs')
    {
        if (static::$instance instanceof StaticLogger) {
            return static::$instance;
        }
        static::$instance = new self($logFile, $logDir);

        return static::$instance;
    }
304996
public function priority($level = 3)
    {
        $this->callbacks[] = function ($message) use ($level) {
            $message->setPriority($level);
        };

        return $this;
    }
1177485
protected function getLogLevel($logLevel)
    {
        switch ($logLevel) {
            case Logger::DEBUG:
                return Severity::debug();
            case Logger::INFO:
                return Severity::info();
            case Logger::NOTICE:
                return Severity::info();
            case Logger::WARNING:
                return Severity::warning();
            case Logger::ERROR:
                return Severity::error();
            case Logger::CRITICAL:
                return Severity::fatal();
            case Logger::ALERT:
                return Severity::fatal();
            case Logger::EMERGENCY:
                return Severity::fatal();

        }
    }
703400
public function setPriority($priority)
    {
        if (!is_numeric($priority)) {
            throw new InvalidArgumentException(
                'Priority must be an integer'
            );
        }

        $this->priority = intval($priority);
        return $this;
    }
1326713
public function getPriorityString()
    {
        if (array_key_exists($this->priority, TicketMessageInterface::PRIORITIES)) {
            return TicketMessageInterface::PRIORITIES[$this->priority];
        }

        return TicketMessageInterface::PRIORITIES[0];
    }
860354
private function normalizePriority($priority)
    {
        if (is_numeric($priority)) {
            $priority = round(floatval($priority), 1);
            if (0 <= $priority && 1 >= $priority) {
                return $priority;
            }
        }

        return null;
    }
486075
public function setHandlerPriority(CommandHandlerInterface $handler, $priority)
    {
        $this->__queue->setPriority($handler, $priority);
        return $this;
    }
513355
public function prettyPrintPriority($priority)
    {
        $map = [
            MessagePriority::VERY_LOW => 'very low',
            MessagePriority::LOW => 'low',
            MessagePriority::NORMAL => 'normal',
            MessagePriority::HIGH => 'high',
            MessagePriority::VERY_HIGH => 'very high',
        ];

        return isset($map[$priority]) ? $map[$priority] : $priority;
    }