Critical conditions.

Example: Application component unavailable, unexpected exception.

@param string $message
@param array $context
@return void

Type hint not possible due to upstream method signature
778309
public function critical($message, array $context = []) : void
    {
        /** @psalm-suppress UndefinedClass */
        SspLogger::critical($message.($context ? " ".var_export($context, true) : ""));
    }
173456
public function error($message, array $context = array()) {
        $context['fromClass'] = get_called_class();
        foreach ($this->loggersInstances as $logger) {
            $logger->error($message, $context);
        }
    }
844039
public static function error($message, array $context = [], string $channel = self::DEFAULT_CHANNEL): void
    {
        self::log(LogLevel::ERROR, $message, $context, $channel);
    }
415805
public function process(Message $message, Context $context)
    {
        $container = $this->kernel->getContainer();

        $data = \json_decode($message->getBody());

        $eventName = $this->prefix . $data->uri;
        $payload = $data->path;

        $dispatcher = $container->get('event_dispatcher');
        $dispatcher->dispatch($eventName, new BusEvent($payload));

        return self::ACK;
    }
234881
public function debug($message, array $context = [])
    {
        if (! empty($context['label'])) {
            $label = PHP_EOL . "$label" . PHP_EOL . str_repeat('=', strlen($label)) . PHP_EOL;
        }
        else {
            $label = '';
        }

        if (is_string($message)) {
            Crush::$process->debugLog[] = "$label$message";
        }
        else {
            ob_start();
            ! empty($context['var_dump']) ? var_dump($message) : print_r($message);
            Crush::$process->debugLog[] = $label . ob_get_clean();
        }
    }
449783
public static function critical($message, array $context = [], string $channel = self::DEFAULT_CHANNEL): void
    {
        self::log(LogLevel::CRITICAL, $message, $context, $channel);
    }
1085009
public function beginAlert(string $message, array $context = []) {
        return $this->begin(LogLevel::ALERT, $message, $context);
    }
20801
public function info($message, array $context = [])
    {
        $this->checkInitialized();

        foreach ($this->loggers as $logger) {
            $logger->info($message, $context);
        }
    }
529371
public function emergency($message, array $context = array()) {
        $context['fromClass'] = get_called_class();
        foreach ($this->loggersInstances as $logger) {
            $logger->emergency($message, $context);
        }
    }
120739
public function addCritical($message, array $context = array())
    {
        return $this->_instance->addRecord(\Monolog\Logger::CRITICAL, $message, $context);
    }
227478
public function beginDebug(string $message, array $context = []) {
        return $this->begin(LogLevel::DEBUG, $message, $context);
    }
805437
public function log($level, $message, array $context = []): void
    {
        if (!isset($this->logLevels[$level])) {
            $level = LogLevel::DEBUG;
        }

        $this->exceptionFile = null;

        if ($this->logLevels[$level] < $this->level) {
            return;
        }

        $exceptionFile = null;
        if (isset($context['exception']) && $context['exception'] instanceof \Throwable) {
            $exceptionFile = $this->getExceptionFile($context['exception']);
        }

        if (SEASLOG_EXTENSION) {
            $message .= $exceptionFile ? ' @@  ' . \basename($exceptionFile) : '';

            \SeasLog::log($level, $message, $context);
        } else {
            $message = Dumper::interpolate($message, $context);

            $line = static::formatLogLine($message, $exceptionFile);
            $file = $this->directory . '/' . $level . '.log';

            if (!@\file_put_contents($file, $line . PHP_EOL, FILE_APPEND | LOCK_EX)) { // @ is escalated to exception
                throw new \RuntimeException("Unable to write to log file '$file'. Is directory writable?");
            }
        }

        if ($exceptionFile) {
            $this->logException($context['exception'], $exceptionFile);
        }

        if (\in_array($level, [LogLevel::ERROR, LogLevel::EMERGENCY, LogLevel::CRITICAL, LogLevel::ALERT], true)) {
            $this->sendEmail($message);
        }

        $this->exceptionFile = $exceptionFile;
    }
1023920
public function critical($message, array $context = array())
    {
        // TODO: Implement critical() method.
        return $this->addRecord(\Psr\Log\LogLevel::CRITICAL, $message, $context);
    }
226794
public function error($message, array $context = []) : void
    {
        /** @psalm-suppress UndefinedClass */
        SspLogger::error($message.($context ? " ".var_export($context, true) : ""));
    }
268018
public function emergency($message, array $context = [])
    {
        $this->checkInitialized();

        foreach ($this->loggers as $logger) {
            $logger->emergency($message, $context);
        }
    }
368858
protected function logWarning($message, array $context = [])
    {
        $this->hasLogger() === true ?: $this->logger->warning($message, $context);
    }
214671
public function error( $message, array $context = [] )
    {
        $this->log->add( "Ошибка запроса/cURL/Библиотеки: {$message}", [
            'payload' => $this->request->serialized_payload ?: $this->request->payload,
            'alias'   => $this->request->alias,
            'hash'    => $this->request->hash,
        ],
                         'critical'
        );

        error_log( $message );
    }