Writes message(s) to output console.

@param string|array $messages message or array of messages
552405
public function write($messages = array())
    {
        //Write it for each message = each renderer
        foreach ($messages as $key => $message) {
            $file = $this->outputPath.DIRECTORY_SEPARATOR.$this->rendererFiles[$key].'.html';
            file_put_contents($file, $message);
            $this->copyAssets($key);
        }
    }
461679
public function setMessages(array $messages)
    {
        return tap($this, function ($instance) use ($messages) {
            $instance->messages = [$instance->messagesWrapper => $messages];
        });
    }
1031489
public function access_messages($messages) {
        $output = '';
        foreach ($messages as $message) {
            $output .= html_writer::tag('p', $message) . "\n";
        }
        return $output;
    }
2743
public function output($message, $depth = 0) {
        foreach ($this->traces as $trace) {
            $trace->output($message, $depth);
        }
    }
222972
protected function appendMessage(string $message): void
    {
        $this->messages[] = $message;

        if (sizeof($this->messages) > $this->config['max_messages']) {
            array_shift($this->messages);
        }
    }
689505
public function write($messages, $options = 0)
    {
        $this->log($messages);
        $this->output->write($messages, false, $options);
    }
1185090
public static function alert(...$messages): void
    {
        static::init();

        if (!static::isTemporaryDisabled('alert')) {
            foreach (static::$adapters as $adapter) {
                /* @var $adapter \Koldy\Log\Adapter\AbstractLogAdapter */
                if ($adapter->isLevelEnabled(self::ALERT)) {
                    $adapter->alert((new Message(self::ALERT))->setMessages($messages));
                }
            }
        }
    }
1142113
public function overwrite($messages, $newline = true, $verbosity = self::VERBOSITY_NORMAL)
    {
        if ($this->hasSupportAnsiCommands() === false || $this->isFirstMessage === true) {
            $this->write($messages, $newline, $verbosity);

            return;
        }

        $messages = implode($newline ? PHP_EOL : '', (array) $messages);
        $numNewLines = substr_count($messages, PHP_EOL);

        $this->write("\x0D", false, $verbosity);
        $this->write("\x1B[2K", false, $verbosity);

        if ($numNewLines > 0) {
            $this->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount), false, $verbosity);
        }

        $this->write($messages, false, $verbosity);

        if ($newline) {
            $this->write('', true, $verbosity);
        }
    }
301817
public function console($messages, $options = ConsoleOutput::VERBOSITY_NORMAL)
    {
        $time = date("Y-m-d H:i:s");

        $wid = 0;
        $processFlag = isset($this->swoole->master_pid) ? '@' : '#';
        $pid = getmypid();
        if (isset($this->swoole->worker_id) && $this->swoole->worker_id >= 0) {
            $wid = $this->swoole->worker_id;
            if ($this->swoole->taskworker) {
                $processFlag = '^'; // taskworker
            } else {
                $processFlag = '*'; // worker
            }
        }
        if (isset($this->swoole->manager_pid) && $this->swoole->manager_pid == $pid) {
            $processFlag = '$'; // manager
        }
        if (isset($this->swoole->master_pid) && $this->swoole->master_pid == $pid) {
            $processFlag = '#'; // master
        }

        $messages = sprintf("[%s %s%d.%d]<info>\tINFO\t</info>%s", $time, $processFlag, $pid, $wid, $messages);

        $this->output->writeln($messages, $options);
    }
687671
protected function write($message, array $record = array())
    {
        $record = array_merge($this->defautlRecord, $record);
        $record['msg'] = $message;
        $this->output->writeln($this->formatter->format($record));
    }
399310
protected function writeSection(array $messages, string $style = 'bg=blue;fg=white'): void
    {
        $this->output->writeln(
            [
                '',
                $this->getHelper('formatter')->formatBlock($messages, $style, true),
                '',
            ]
        );
    }
486564
public function writeln($messages = array())
    {
        //Write it for each message = each renderer
        foreach ($messages as $key => $message) {
            $file = $this->outputPath.DIRECTORY_SEPARATOR.$this->rendererFiles[$key].'.html';
            file_put_contents($file, $message, FILE_APPEND);
        }
    }
922384
private function notify($message)
    {
        if ($this->output !== null) {
            $this->output->writeln("<info>{$message}</info>");
        }

        $this->app['logger.system']->info($message, ['event' => 'cron']);
    }
881550
public function log($messages)
    {
        if (!is_array($messages)) {
            $messages = [$messages];
        }
        foreach ($messages as $message) {
            file_put_contents($this->logFile, date('d.m.Y H:i:s') . ' - ' . $message . PHP_EOL, FILE_APPEND | LOCK_EX);
        }
    }
64937
public function messagePrintf(array $args = array())
    {
        $this->raw_msg = vsprintf($this->raw_msg, $args);
        $this->message = vsprintf($this->message, $args);
    }
342924
protected function printMessages(string $type, array $messages = []) : void
    {
        $this->out('');

        $plural = Inflector::pluralize($type);
        if (empty($messages)) {
            $this->success("No $plural found in module.");

            return;
        }

        // Minimize output to only unique messages
        $messages = array_unique($messages);

        $plural = ucfirst($plural);
        $this->{$type}("$plural (" . count($messages) . "):");

        // Remove ROOT path for shorter output
        $messages = preg_replace('#' . ROOT . DS . '#', '', $messages);
        if (null === $messages) {
            return;
        }

        // Prefix all messages as list items
        $messages = preg_replace('/^/', ' - ', $messages);
        if (null === $messages) {
            return;
        }

        $this->{$type}($messages);
    }
649247
public static function write($message){
      if( preg_match('~<[^>]+>~',$message)) {
         // Use preg_replace_callback for fast regex matches navigation
         echo strtr(preg_replace_callback('~^(.*)<([^>]+)>(.+)</\2>(.*)$~USm',function($m){
            static::write($m[1]);
            $color = strtoupper(trim($m[2]));
            if( isset(static::$shell_colors[$color]) ) echo static::$shell_colors[$color];
            static::$color_stack[] = $color;
            static::write($m[3]);
            array_pop(static::$color_stack);
            $back_color = array_pop(static::$color_stack) ?: static::$color_stack[]='NORMAL';
            if( isset(static::$shell_colors[$back_color]) ) echo static::$shell_colors[$back_color];
            static::write($m[4]);
         },strtr($message,["\n"=>"&BR;"])),["&BR;"=>PHP_EOL]);
      } else {
         echo strtr($message,["&BR;"=>PHP_EOL]);
      }
   }