Prints a message to debug log

@param string $message - message needs to contain "%s" to print timing

@return bool
978380
public function debug($message = "%s seconds")
    {
        $this->logger->debug(sprintf($message, $this->currentProfile->getDuration()));
    }
1170916
public function debug($message = '', $context = [], $role = 'system', $times = 0, $ttl = 0)
    {
        if ($this->isSingle()) {
            $this->log($message, $context, Logger::DEBUG, $role, $times, $ttl);
        }
    }
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);
        }
    }
1231128
public function logDebugOrMore($message)
    {
        $this->log($message, Project::MSG_DEBUG);
        if ($this->verbose) {
            $this->log($message);
            return true;
        }
        return false;
    }
1009665
public function write($message)
    {
        $written = false;

        if ($this->output_allowed) {
            $written = error_log($message);
        }

        return $written;
    }
931011
public function warning($message)
    {
        $args = func_get_args();
        array_shift($args);
        return $this->log(Log::Warning, $message, $args);
    }
1352096
public static function debug($msg)
    {
        if ($msg === 'open' || $msg === 'close') {
            self::$_debugOpen = $msg === 'open';
        } elseif (self::$_debugOpen === true) {
            $key = self::$_processKey === null ? '' : '[' . self::$_processKey . '] ';
            echo '[DEBUG] ', date('H:i:s '), $key, implode('', func_get_args()), self::CRLF;
        }
    }
808743
private function prepareMessage($message) {
    return is_string($message) ? $message :
      (is_object($message) && method_exists($message, '__toString') ? $message->__toString() :
            StringUtil::getDump($message));
  }
365654
public function log($message)
    {
        if ($this->enabled) {
            $entry = $this->formatMessage($message);
            $fp = fopen($this->file, "a");
            fwrite($fp, $entry . PHP_EOL);
            fclose($fp);
        }
    }
757200
protected function prepareMessage($message)
    {
        list($text, $level, $category, $timestamp) = $message;

        $level = Logger::getLevelName($level);
        $timestamp = date('c', $timestamp);

        $result = ArrayHelper::merge(
            $this->parseText($text),
            ['level' => $level, 'category' => $category, '@timestamp' => $timestamp]
        );

        if (isset($message[4]) === true) {
            $result['trace'] = $message[4];
        }

        return $result;
    }
773717
protected function stringifyMessage($message)
    {
        if (is_array($message) || is_object($message) || is_bool($message)) {
            return (string)var_export($message, true);
        }
        return (string)$message;
    }
495190
private static function debugStart($message)
    {
        // SWATDB_DEBUG is legacy, use SwatDB::setDebug() instead
        if (defined('SWATDB_DEBUG') || self::$debug) {
            $trace = debug_backtrace();

            // get first trace line that is not in the SwatDB package
            foreach ($trace as $entry) {
                if (
                    !array_key_exists('class', $entry) ||
                    strncmp($entry['class'], 'SwatDB', 6) !== 0
                ) {
                    break;
                }
            }

            $class = array_key_exists('class', $entry) ? $entry['class'] : null;

            $function = array_key_exists('function', $entry)
                ? $entry['function']
                : null;

            ob_start();
            printf(
                "<strong>%s%s%s()</strong><br />\n",
                $class === null ? '' : $class,
                array_key_exists('type', $entry) ? $entry['type'] : '',
                $function === null ? '' : $function
            );

            echo $message;
            $debug_message = ob_get_clean();

            $debug_info = array();
            $debug_info['message'] = $debug_message;
            $debug_info['time'] = microtime(true) * 1000;
            $debug_info['depth'] = self::$debug_wrapper_depth;
            $debug_info['count'] = self::$query_count;
            self::$debug_info[] = $debug_info;

            self::$debug_wrapper_depth++;
        }
    }
783191
public function debug($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->debug($message, $context);
        }

        return false;
    }
939519
function writeToLog($message) {
		if ($this->logFile) {
			$timestamp = date("Y-m-d H:i:s");
			$timestamp = str_pad($timestamp, 20);
			if (isset($_SERVER["REMOTE_ADDR"])) {
				$ip = $_SERVER["REMOTE_ADDR"];
			} else {
				$ip = "Unknown IP";
			}
			$ip = str_pad($ip, 15);
			$taggedMessage = "$timestamp $ip $message\n";
			file_put_contents($this->logFile, $taggedMessage, FILE_APPEND);
		}
		if ($this->logCallback) {
			call_user_func_array($this->logCallback, array($message));
		}
	}
830594
public function match(string $message): bool
    {
        if ($this->regexp) {
            return (bool) preg_match($this->message, $message);
        }

        return mb_strtolower($this->message) === mb_strtolower($message);
    }
959116
public function debug($message = true, array $context = [])
    {
        // using this to switch on/off the debug for this object
        if (is_bool($message)) {
            $this->debug = $message;

            return $this;
        }

        // if debug is enabled, then log it
        if ($this->debug) {
            if (!isset($this->app) || !isset($this->app->logger) || !$this->app->logger instanceof \Psr\Log\LoggerInterface) {
                $message = '['.get_class($this).']: '.$message;
            }
            $this->log(LogLevel::DEBUG, $message, $context);
        }

        return $this;
    }
1032648
public function error($message)
    {
        $args = func_get_args();
        array_shift($args);
        return $this->log(Log::Error, $message, $args);
    }