log index with query for grpc

This commit is contained in:
reesporte 2022-02-04 16:04:19 -06:00
parent 36b721fd8d
commit 1f8efd663c

View file

@ -1645,7 +1645,7 @@ func LogQuery(ctx context.Context, method string, req interface{}, logger logger
}
switch r := req.(type) {
case *pb.QueryPQLRequest:
logger.Infof("GRPC: %v, %v, %v, %v, %v, %s", ip, ua, method, uinfo.UserID, uinfo.UserName, r.Pql)
logger.Infof("GRPC: %v, %v, %v, %v, %v, [%s]%s", ip, ua, method, uinfo.UserID, uinfo.UserName, r.Index, r.Pql)
case *pb.QuerySQLRequest:
logger.Infof("GRPC: %v, %v, %v, %v, %v, %s", ip, ua, method, uinfo.UserID, uinfo.UserName, r.Sql)
default: