src/Base/Logger/StdioLogger.php
protected function convertMessageToString($message) {
        $messageStr = $message;
        if ($message === null) {
            $messageStr = 'NULL';
        } elseif ($message instanceof \Throwable) {
            $messageStr = $this->convertErrorToString($message);
        } elseif (is_bool($message)) {
            $messageStr = $message ? 'TRUE' : 'FALSE';
        } elseif (!is_scalar($message)) {
            $messageStr = print_r($message, true);
        }
        return $messageStr;
    }
protected function convertMessageToString($message) {
        $messageStr = $message;
        if ($message === null) {
            $messageStr = 'NULL';
        } elseif ($message instanceof \Throwable) {
            $messageStr = $this->convertErrorToString($message);
        } elseif (is_bool($message)) {
            $messageStr = $message ? 'TRUE' : 'FALSE';
        } elseif (!is_scalar($message)) {
            $messageStr = print_r($message, true);
        }
        return $messageStr;
    }
Convert message to string
@param mixed $message
@return mixed|string