A helper method to process log parameters.

@param array $message Message parametrized similarly to how sprintf works.

@return void
172823
private static function processParams(array $message): string
    {
        $msg_type = count($message);
        if($msg_type==1) {
            return (string) $message[0];
        } else if($msg_type<1) {
            return "";
        } else {
            $params = $message;
            $message = array_shift($params);
            return sprintf($message, ...$params);
        }
    }
576255
protected function logError($message)
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->error($message);
        } else {
            error_log($message);
        }
    }
1283242
public function message($message)
    {
        if(trim($message))
        {
            $msg = new stdClass();
            $msg->type = 'text';
            $msg->message = $message;
            $this->messages[] = $msg;
        }        
    }
758292
protected function appendMessage(Message $message): void
    {
        $this->messages[] = $message;

        if (sizeof($this->messages) > 100) {
            array_shift($this->messages);
        }
    }
402626
public static function makeLog($message, array $context = [], array $params = [])
    {
        self::init($params);
        self::$instance->makeLog($message, $context);
    }
118680
protected function log($message, $priority = LogLevel::INFO, $parameters = array())
    {
        Dispatcher::getInstance()->dispatch(
            'system.log',
            LogEvent::createInstance($this)
                ->setContext($parameters)
                ->setMessage($message)
                ->setPriority($priority)
        );
    }
1326699
public function pushLog($message, array $context = [])
    {
        if ($this->logFile) {
            Log::getInstance([
                'channel' => 'SQL',
                'level' => 'info',
                'maxSize' => 1000000, // default
            ])->pushInfo($message, $context);
        }
    }
641480
protected function logInfo(string $message, array $context = []): void
    {
        if ($this->logger !== null) {
            $this->logger->info($message, $context);
        }
    }
1190194
public function warning($message): void
	{
		$message = $this->logMessToArray($message);
		$this->log(array_merge(['SEVERITY' => 'WARNING'], $message));
	}
28598
public function prepareTranslatedMessage(array $message = [])
    {
        $translatedMessage = \App\Registry::$translate->_($message['message']);
        array_unshift($message['vars'], $translatedMessage);
        return call_user_func_array('sprintf', $message['vars']);
    }
934990
public function add($message)
    {
        $this->_messages[] = $this->log_timestamp() . $message . PHP_EOL;
        $this->debug($message);
    }
382793
protected function _log($message, $priority = 4)
    {
        if (!$this->_options['logging']) {
            return;
        }
        if (!(isset($this->_options['logger']) || $this->_options['logger'] instanceof Zend_Log)) {
            Zend_Cache::throwException('Logging is enabled but logger is not set');
        }
        $logger = $this->_options['logger'];
        $logger->log($message, $priority);
    }
423507
protected function log($message)
    {
        if (method_exists($this->inputOutput, 'writeError')) {
            $this->inputOutput->writeError($message);
        } else {
            // @codeCoverageIgnoreStart
            // Backwards compatiblity for Composer before cb336a5
            $this->inputOutput->write($message);
            // @codeCoverageIgnoreEnd
        }
    }
1334539
private static function addError($message): void
    {
        if (self::$result === false) {
            self::$result = array();
        }
        self::$result[] = $message;
    }
626251
public function logEvent(EventMessage $message): void
    {
        $name = $message->payloadType()->toString();

        $this->logger->info(
            sprintf('Event dispatched {%s}', $name),
            ['message' => $message->toString()]
        );
    }
162283
public function log($message, $context = "[Strata]")
    {
        $logger = $this->getLogger();
        if (!is_null($logger)) {
            $logger->log($message, $context);
        }
    }
687422
public function notice($message, array $context = array())
    {
        if ($this->logger) {
            $context = $this->getLoggerContext($context);

            $this->logger->notice($message, $context);
        }
    }