Write a message to STDERR, prefixed with "Debug: ".

@param string $message Message to write.
@param string|bool $group Organize debug message to a specific group.
Use `false` for no group.
16983
public function debug( $message, $group = false ) {
		static $start_time = null;
		if ( null === $start_time ) {
			$start_time = microtime( true );
		}
		$debug = $this->get_runner()->config['debug'];
		if ( ! $debug ) {
			return;
		}
		if ( true !== $debug && $group !== $debug ) {
			return;
		}
		$time   = round( microtime( true ) - ( defined( 'WP_CLI_START_MICROTIME' ) ? WP_CLI_START_MICROTIME : $start_time ), 3 );
		$prefix = 'Debug';
		if ( $group && true === $debug ) {
			$prefix = 'Debug (' . $group . ')';
		}
		$this->_line( "$message ({$time}s)", $prefix, '%B', STDERR );
	}
671527
public function debug($message)
    {
        $config = ConfigManager::getInstance()->getConfigHashmap();
        // Disable debug in live mode.
        if (array_key_exists('mode', $config) && $config['mode'] != 'live') {
            $this->logger->debug($message);
        }
    }
403146
public function logMessage($message)
    {
        $this->logger->info(strip_tags($message));

        if ($this->sendToBrowser) {
            $this->sendMessageToBrowser($message);
        }

        if ($this->sendToCli) {
            $this->sendMessageToCli($message);
        }
    }
821548
private function overwrite($message)
    {
        if ($this->output->isDecorated()) {
            $this->output->write("\x0D\x1B[2K");
            $this->output->write($message);
        } else {
            $this->output->writeln($message);
        }
    }
721093
public function debug($message, array $context = array())
    {
        if ($this->logger) {
            $context = $this->getLoggerContext($context);

            $this->logger->debug($message, $context);
        }
    }
521561
public static function debugPrintln($message)
    {
        global $globals;
        
        if (isset($globals['DEBUG']) && $globals['DEBUG'] == true)
        {
            self::println($message);
        }
    }
154974
public function write($message, $newline = false, $type = 0)
    {
        $messages = (array) $message;

        if ($this->getLogger()) {
            foreach ($messages as $message) {
                $this->getLogger()->info($this->getFormatter()->format(strip_tags($message)));
            }
        }

        parent::write($messages, $newline, $type);
    }
1304784
public static function debug( $message, $values = [] )
	{
		$logger = self::instance();
		if ( $logger ) {
			$logger->debug(
				$message,
				is_array( $values )
					? $values
					: ( is_object( $values )
						? (array)$values
						: [ $values ]
					)
			);
		}
	}
1282478
public function debug(string $msg) {
		if ($this->level > self::DEBUG)
			return;
		$this->write('DEB', $msg);
	}
999914
private function debug($message)
    {
        if (1 < func_num_args()) {
            $message = call_user_func_array('sprintf', func_get_args());
        }
        $this->logger->addDebug($message);
    }
1008115
protected function log($message): void
    {
        if ($this->logger !== null) {
            $this->logger->log($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());
    }
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
        }
    }
545719
protected function log($message)
    {
        $this->debug && Log::info($this->lockfilePath . ' ' . getmypid() . ' ' . $message);
    }
773000
public function error($message)
    {
        $this->_errors[] = $this->log_timestamp() . $message . PHP_EOL;
        $this->debug('ERROR: '.$message);
    }
1189578
public function error($message) {
        $message = printPretty($message, $return=true);

        $hStream = CLI ? \STDERR : fopen('php://stderr', 'a');
        fwrite($hStream, $message);
        if (!CLI) fclose($hStream);
    }
51726
protected function logDebug(string $message, array $context = []): void
    {
        if ($this->logger !== null) {
            $this->logger->debug($message, $context);
        }
    }