This method is used to log something in debug mode.

@param string $str string to log

@return void
967268
public static function trace($str)
    {
        $dbg = debug_backtrace();
        phpCAS :: log($str . ' [' . basename($dbg[0]['file']) . ':' . $dbg[0]['line'] . ']');
    }
1195214
protected static function debugSet(string $key, $value): void
    {
        Debug::setCache(static::$type, 'set', $key, is_string($value) ? $value : json($value));
    }
888279
protected function parseTemplate($str)
    {
        $tag = '/{([\/$]?[-_:\w]*)}/';

        $input = preg_split($tag, $str, -1, PREG_SPLIT_DELIM_CAPTURE);

        $prefix = current($input);
        next($input);
        $this->template = [$prefix];

        $this->parseTemplateRecursive($input, $this->template);
    }
1366330
public function writeAll($str)
    {
        if (substr($str, -1) == "\n") {
            $str = substr($str, 0, -1);
        }
        $this->write($str);
        $this->close('in');
        $this->debugStatus();

        return $this;
    }
858546
static void printToLogFile(String str) {
    try (BufferedWriter bw = new BufferedWriter(new FileWriter(getLogPath(), true))) {
      bw.write(str + logLineBreak);
    } catch (Throwable t) {
      showError(t);
    }
  }
1004931
public function warn($str, $logType = "") {
        if ($this->_level >= self::WARN) {
            //$this->put("[WARN] [$str] ".$this->caller(), $this->_wfName);
            $this->put("$str ".$this->caller(), self::WARN);
        }
    }
1318310
@Override
    public void debug(String msg) {
        if (logger.isLoggable(Level.FINE)) {
            log(SELF, Level.FINE, msg, null);
        }
    }
1303161
public static function report($st)
	{
		if ( !isset(self::$cli) )
		{
			global $argv;
			self::$cli = isset($argv) ? 1 : false;
		}
		if ( self::$cli )
		{
			if ( \is_string($st) )
				echo $st."\n";
			else
				var_dump($st)."\n";
		}
		else
		{
			if ( \is_string($st) )
				array_push(self::$info,$st);
			else
				array_push(self::$info,print_r($st,true));
		}
	}
1366252
private function evalString($str)
    {
        $a = false;

        if (class_exists('ParseError')) {
            try {
                $a = eval("return $str;");
            } catch (ParseError $e) {
            }
        } else {
            $a = @eval("return $str;");
        }

        return $a;
    }
318387
protected static function _highlight($str)
    {
        if (function_exists('hphp_log') || function_exists('hphp_gettid')) {
            return htmlentities($str);
        }
        $added = false;
        if (strpos($str, '<?php') === false) {
            $added = true;
            $str = "<?php \n" . $str;
        }
        $highlight = highlight_string($str, true);
        if ($added) {
            $highlight = str_replace(
                ['&lt;?php&nbsp;<br/>', '&lt;?php&nbsp;<br />'],
                '',
                $highlight
            );
        }

        return $highlight;
    }
990161
public function logDebug($message, $attachment = null) {
        $this->messages[] = "debug: " . $message . print_r($attachment, true);
    }
1132464
public function seeTextInEmail($str)
    {
        $this->assertTrue($this->contains($str, $this->driver->getStringsByEmail($this->getCurrentMail())));
    }
415216
public function write(string $str)
    {
        $handler = fopen($this->_path, "w");
        fwrite($handler, $str);
        fclose($handler);
    }
765990
function indent($str, $output = true) {
    if ($this->parser->isStartTag) {
      $this->indent .= $str;
      if ($output) {
        $this->out($str, true);
      }
    } else {
      $this->indent = substr($this->indent, 0, -strlen($str));
    }
  }
600067
public static function parse($str)
    {
        if (preg_match('#\{:.*?:\}#', $str) === 0) {
            return false;
        }

        $str = preg_replace('#' . self::$rearg . '#', '\\\$0', $str);
        return preg_replace_callback('#\\\{:.*?:\\\}#',
                    array( '\\' . get_called_class(), 'args' ), $str);
    }
563818
public function debug($value='')
    {
        if($this->sieve->debug) {
            self::$writer->swrite(LOG_DEBUG, sprintf($this->template, 'DEBUG', $value));
        }
    }
84642
protected function debugPrint($msg)
    {
        if ($this->logger) {
            $this->logger->debug("$msg\n");
        } else {
            parent::debugPrint($msg);
        }
    }