src/Leevel/Debug/Debug.php
protected function databaseEventDispatch(): void
    {
        $this->getEventDispatch()->

        register(IConnect::SQL_EVENT, function (string $event, string $sql, array $bindParams = []) {
            $this->getCollector('logs')->addMessage($sql.': '.json_encode($bindParams, JSON_UNESCAPED_UNICODE), 'sql');
        });
    }
protected function databaseEventDispatch(): void
    {
        $this->getEventDispatch()->

        register(IConnect::SQL_EVENT, function (string $event, string $sql, array $bindParams = []) {
            $this->getCollector('logs')->addMessage($sql.': '.json_encode($bindParams, JSON_UNESCAPED_UNICODE), 'sql');
        });
    }
设置数据库 SQL 监听器.