Output a message, in text mode, if we are currently debugging

@param string $message The message to output
@param mixed $data Additional data to output

@return void
177561
public static function text($message, $data = null)
    {
        if (!static::$on) {
            return;
        }

        echo "--------------------------------------------------------------------------------\n";
        static::indent();
        echo static::getTime() . " - " . $message . "\n";
        if (is_array($data)) {
            print_r($data);
        } elseif ($data) {
            static::indent();
            echo "    " . $data . "\n";
        }
    }
428313
public function debug(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->debug($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::DEBUG);
        }
    }
497347
protected function debugLogger(string $message, array $context = []) {
    if ($this->debug) {
      $this->logger->debug($message, $context);
    }
  }
293457
public static function setDebugData($data)
    {
        $matches = null;

        preg_match_all("/<p class=\"message warning\">\n(.*?)<\/p>/s", $data, $matches);

        if (!empty($matches[1])) {
            self::$debug = $matches[1];
        }
    }
1072844
public function debug($message)
    {
        if ( ! $this->getOutput()->isDebug()) {
            return null;
        }

        if (func_num_args() > 1) {
            $message = vsprintf($message, array_slice(func_get_args(), 1));
        }

        $this->getOutput()->writeln($message);
    }
255470
protected function error($message)
    {
        if ($this->output instanceof ConsoleOutputInterface) {
            $this->output->getErrorOutput()->writeln("<error>$message</error>");
        } else {
            $this->output->writeln("<error>$message</error>");
        }
    }
1010427
public static function debug($message, $args = array())
    {
        if (Logger::$output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
            /** @noinspection HtmlUnknownTag */
            Logger::$output->writeln('<fg=green>' . vsprintf($message, $args));
        }
    }
100019
public function output($message, $depth = 0) {
        ob_start();
        $this->trace->output($message, $depth);
        $this->buffer .= ob_get_contents();
        if ($this->passthrough) {
            ob_end_flush();
        } else {
            ob_end_clean();
        }
    }
351408
public function log($message, $data)
    {
        // TODO: Implement log() method.
        $this->logMessages->enqueue([
            'date'    => date('Y-m-d H:i:s'),
            'message' => $message,
            'data'    => $data
        ]);

        return $this;
    }
1138516
public function debug($message, array $context = [])
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->debug($message, $context);
        }
    }
996176
public static function output($message, $data = [], $code = 0)
    {
        header('Content-Type:text/html;Charset=' . APP_CHARSET);
        $output = [
            'code' => $code,
            'message' => $message,
            'data' => $data,
        ];
        if (isset($_GET['e_callback']) && $_GET['e_callback']) {
            echo $_GET['e_callback'] . '(' . json_encode($output) . ')';
        } else {
            if (!headers_sent()) header('Content-type: application/json');
            echo json_encode($output);
        }
    }
466966
public function debug($message, $args=array())
    {
        $backtrace        = debug_backtrace();
        $args['FILENAME'] = $backtrace[0]['file'];
        $args['LINENO']   = $backtrace[0]['line'];
        $this->log($message, $args, 'LOG_DEBUG');

    }
1146412
public function outputCli( $message, $type )
    {
        if ( $type == 'normal' )
        {
            $this->output->outputLine( $message );
            $this->output->outputLine();
        }
        else if ( $type == 'warning' )
        {
            $this->output->outputLine( "Warning: ", 'warning' );
            $this->output->outputLine( $message);
            $this->output->outputLine();
        }
    }
751015
protected function echoMessage($out)
    {
        if ($this->output) {
            if ($this->output->getVerbosity() >= $this->minVerbosityLevel) {
                $this->output->writeln($out);
            }
        }

        if ($this->logger) {
            $this->logger->debug($out);
        }
    }
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();
        }
    }
751468
protected function logDebug($message, array $context = [])
    {
        $this->hasLogger() === true ?: $this->logger->debug($message, $context);
    }
91180
public function send(Message $message) : void
    {
        header('Content-Type: text/xml', true);

        $xml = $this->getOutputToSend($message);
        if ($xml !== false) {
            Utils::getContainer()->debugMessage($xml, 'out');
            echo $xml;
        }

        // DOMDocument::saveXML() returned false. Something is seriously wrong here. Not much we can do.
        exit(0);
    }