Log any.
@param  any  $message
@param  bool $separate
@return ?bool
@since  3.2
974790
public function logAny($message, bool $separate = false): ?bool
    {
        return $this->log(self::ANY, $message, $separate);
    }
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());
    }
904914
protected function logMessage($level, $message)
    {
        if (array_search($level, $this->levels) > $this->levelPosition) {
            return;
        }

        echo $message;
    }
166247
public function tLog(string $level, string $message, array $context = []) {
        $logtag = $this->getLogTag();
        if (is_array($message) || is_object($message)) {
            $message = print_r($message, true);
        }
        $this->log($level, "[{time}] [{$logtag}] ".$message, $context);
    }
1059493
public function log ($level, $message, array $context = [])
  {
    $levelName = isset(self::$LEVELS[$level]) ? self::$LEVELS[$level] : $level;
    $message   = Debug::interpolate ($message, $context);
    $this->write ("<#log><#i><span class=__alert>$levelName</span> $message</#i></#log>");
  }
499681
public function log($level, $message, array $context = array())
    {
        $eol = isset($context['newLine']) && $context['newLine'] === false ? '' : PHP_EOL;
        
        if ($this->addLeveLMarkersToMessage && !empty($level)) {
            echo '<',$level,'>',$message,'</',$level,'>',$eol;
        } else {
            echo $message,$eol;
        }
    }
1323957
public function log($level, $message)
    {
        if (func_num_args() > 3) {
            $args = array_slice(func_get_args(), 3);
            if (is_array($args[0])) {
                $args = $args[0];
            }
            $this->log->write($level, $this->className, $message, $args);
        } else {
            $this->log->write($level, $this->className, $message);
        }
    }
444879
protected function write($message, $destination, $apart = false, $append = false)
    {
        // 检测日志文件大小，超过配置大小则备份日志文件重新生成
        $this->checkLogSize($destination);

        // 日志信息封装
        $info['timestamp'] = date($this->config['time_format']);

        foreach ($message as $type => $msg) {
            $info[$type] = is_array($msg) ? implode("\r\n", $msg) : $msg;
        }

        if (PHP_SAPI == 'cli') {
            $message = $this->parseCliLog($info);
        } else {
            // 添加调试日志
            $this->getDebugLog($info, $append, $apart);

            $message = $this->parseLog($info);
        }

        return error_log($message, 3, $destination);
    }
876555
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            if ($this->getMessageFunction !== null) {
                $line = call_user_func($this->getMessageFunction, $message);
            } else {
                $time = $message->getTime()->format('y-m-d H:i:s.v');
                $level = strtoupper($message->getLevel());
                $space = str_repeat(' ', 10 - strlen($level));
                $who = $message->getWho() ?? Log::getWho();
                $line = "{$time} {$level}{$space}{$who}\t{$message->getMessage()}\n";
            }

            if (is_string($line)) {
                print $line;
            }
        }
    }
547224
public function log($level, $message, array $context = array()) {
		$ctx = $context;
		if(!count($ctx)) {
			$ctx = new \stdClass();
		}
		$message = sprintf($this->format, $message, json_encode($ctx, $this->jsonOptions));
		$this->logger()->log($level, $message, $context);
	}
1231128
public function logDebugOrMore($message)
    {
        $this->log($message, Project::MSG_DEBUG);
        if ($this->verbose) {
            $this->log($message);
            return true;
        }
        return false;
    }
979632
public function log($level, $message, array $context = [])
    {
        if (!$this->enabled) {
            return;
        }
        $message = self::replace($message, $context);
        if (is_resource($this->resource)) {
            fwrite($this->resource, "[{$level}] " . $message. "\n");
        } elseif (is_callable($this->resource)) {
            call_user_func($this->resource, "[{$level}] {$message}\n");
        } else {
            echo "[{$level}] {$message}\n";
        }
    }
1157139
protected function log($message)
    {

        if ($this->debug == true) {
            file_put_contents("php://stdout", $message . "\n");
        }

        file_put_contents($this->dump_dir . 'dump.log', $message . "\n", \FILE_APPEND);
    }
896583
public static function log($message, $options = array())
    {
        if (array_key_exists('inputs', $options)) {
            $inputs = $options['inputs'];
        } else {
            $inputs = array(
                self::getTimestamp(),
                'LOG',
                self::getFilename(),
                self::getLineNumber()
            );
        }

        if (!array_key_exists('output', $options)) {
            $options['output'] = 'STDOUT';
        }

        if (array_key_exists('format', $options)) {
            array_unshift($inputs, $options['format']);
        } else {
            array_unshift($inputs, self::$format);
        }

        $inputs[] = $message;

        $logMessage = self::getLogMessage($inputs);
        if (array_key_exists('colour', $options) && !empty($options['colour'])) {
            self::out($logMessage, $options['colour'], $options['output']);
        } else {
            self::out($logMessage, false, $options['output']);
        }
    }
1170610
public function log($level, $message, array $context = [])
    {
        $message = $this->_format($message, $context);
        $output = date('Y-m-d H:i:s') . ' ' . ucfirst($level) . ': ' . $message;

        return (bool)$this->_output->write(sprintf('<%s>%s</%s>', $level, $output, $level));
    }
1173729
static function record($message,$level=self::ERR,$record=false) {
        if($record || false !== strpos(C('LOG_LEVEL'),$level)) {
            self::$log[] =   "{$level}: {$message}\r\n";
        }
    }
210119
public static function log($level, $message, array $context = array())
    {
        return self::getInstance()->log($level, $message, $context);
    }