Logs / echos a message.

@param string $message The message to log / echo
@param string $color The optional color or status, defaults to `white`
@param bool $verbose The optional verbosity, defaults to `false`
427289
protected function log(string $message, string $color = 'white', bool $verbose = false) {
    if ($message && $verbose) {
      $message = new Color($message);

      switch(true) {
        case ($color === 'info' || $color === 'blue'):
          echo $message->blue . PHP_EOL;

          break;

        case ($color === 'ok' || $color === 'green'):
          echo $message->green . PHP_EOL;

          break;

        case ($color === 'warning' || $color === 'yellow'):
          echo $message->yellow . PHP_EOL;

          break;

        case ($color === 'error' || $color === 'red'):
          echo $message->red . PHP_EOL;

          break;

        default:
          echo $message->white . PHP_EOL;
      }
    }
  }
249802
public static function alert($color, $message, $htmlOptions = array())
    {
        self::addCssClass('alert', $htmlOptions);
        if (!empty($color)) {
            self::addCssClass('alert-' . $color, $htmlOptions);
        }
        if (TbArray::popValue('in', $htmlOptions, true)) {
            self::addCssClass('in', $htmlOptions);
        }
        if (TbArray::popValue('block', $htmlOptions, false)) {
            self::addCssClass('alert-block', $htmlOptions);
        }
        if (TbArray::popValue('fade', $htmlOptions, true)) {
            self::addCssClass('fade', $htmlOptions);
        }
        $closeText = TbArray::popValue('closeText', $htmlOptions, self::CLOSE_TEXT);
        $closeOptions = TbArray::popValue('closeOptions', $htmlOptions, array());
        $closeOptions['dismiss'] = self::CLOSE_DISMISS_ALERT;
        $output = self::openTag('div', $htmlOptions);
        $output .= $closeText !== false ? self::closeLink($closeText, '#', $closeOptions) : '';
        $output .= $message;
        $output .= '</div>';
        return $output;
    }
1153976
final public static function displayAsError(string $message, string $exit = "yes")
    {
        $colors = self::getManagerColorInstance();
        echo "\n\n".$colors->getColoredString($message, "red", "transparent");
        if ($exit == "yes") {
            exit();
        }
    }
1175819
public function outVerbose($message, $options = array())
    {
        
        common_Logger::i($message);
        if (isset($this->parameters['verbose']) && $this->parameters['verbose'] === true) {
        	$this->out($message, $options);
        }
        
    }
884233
public function log($level, $message, array $context = array())
    {
        $this->logMessage(
            $level,
            (
                $this->getLevelColor($level)
                . $this->getFormattedMessage($level, $message)
                . $this->getDefaultColor()
            )
        );
    }
1104036
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            if ($this->config['send_immediately']) {

                call_user_func($this->config['exec'], $message);

            } else {
                $this->messages[] = $message;

                if (count($this->messages) == 1) {
                    // register shutdown on first message in queue
                    $self = $this;
                    register_shutdown_function(function () use ($self) {
                        $fn = $self->getExecFunction();
                        call_user_func($fn, $self->getMessages());
                    });
                }
            }
        }
    }
1079986
protected function colorize($message, $color = null)
    {
        if (!$color) {
            return $message;
        }

        // Create tag
        $tag = in_array($color, ['error', 'comment', 'info'], true) ? $color : 'fg='.$color;

        return sprintf('<%s>%s</%s>', $tag, $message, $tag);
    }
461694
public function log($level, $message, array $context = array())
    {
        $this->checkLevel($level);
        $prefix = $this->colorsEnabled ?
            ColorHelper::colorString(strtoupper("[{$level}]"), $this->getFGColor($level), $this->getBGColor($level)) :
            strtoupper("[{$level}]");
        $message = $this->interpolate($message, $context);
        if (isset($context['exception']) && $context['exception'] instanceof \Exception) {
            $message .= PHP_EOL . $this->handleException($context['exception']);
        }
        $message = $this->processMultiline($level, $message);
        fputs($this->getOutputStream($level), "{$prefix}: $message" . PHP_EOL);
    }
982167
public function diag()
    {
        $messages = func_get_args();
        foreach ($messages as $message) {
            echo $this->colorizer->colorize('# ' . join("\n# ", (array)$message), 'COMMENT') . "\n";
        }
    }
416055
protected function verboseLog($message)
    {
        if (!$this->isDryRunEnabled() &&
             $this->getOutput()->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) {
            return;
        }

        $this->getOutput()->writeln($message);
    }
892805
public function log($message)
    {
        $formattedMessage = $this->formatMessage($message);
        if (!empty($formattedMessage)) {
            $this->logger->info($formattedMessage);
        }
    }
854792
protected function debug($message, $args = array()) {
    if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
        /** @noinspection HtmlUnknownTag */
        $this->output->writeln('<fg=green>'.sprintf($message, $args));
        }
    }
741280
function log(msg, color) {
        if (typeof(msg) === 'object') {
            for (var item in msg) {
                if (msg.hasOwnProperty(item)) {
                    if(color && color in $.util.colors) {
                        $.util.log($.util.colors[color](msg[item]));
                    }
                    $.util.log($.util.colors.lightgreen(msg[item]));
                }
            }
        } else {
            $.util.log($.util.colors.green(msg));
        }
    }
1355720
def debug(cls, message):
        
        if cls.verbose > 1:
            msg = '[DEBUG] %s' % message
            cls.echo(msg)
1050508
protected function verbose($message, $level)
    {
        if ($this->output->getVerbosity() >= $level) {
            $this->output->write($message);
        }
    }
614788
private function logMessage(Message $message)
    {
        $logMessage = \sprintf(
            '%s %s (%.3Fs)',
            $message->getRequest()->getMethod(),
            (string) $message->getRequest()->getUri(),
            $message->getDuration()
        );

        // This is a "simple" log, for general purpose
        $this->logger->log(
            $message->getLogLevel(),
            $logMessage
        );

        // This is a debug log, with all message details, useful for debugging
        $this->logger->debug($logMessage, $message->jsonSerialize());
    }
1238533
public function log($message)
    {
        if ($this->progress) {
            $this->progress->setMessage($message);
            $this->logs[] = $message;
        } else {
            $this->output->writeLn($message);
        }
    }