mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 14:41:02 +00:00
Merge pull request #1908 from molecula/log-index
log index with query for grpc
This commit is contained in:
commit
e8c123ca23
3 changed files with 5 additions and 5 deletions
|
|
@ -216,7 +216,7 @@ package for linux amd64:
|
|||
GOARCH: "amd64"
|
||||
script:
|
||||
- echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
|
||||
- apt update && apt install nfpm
|
||||
- apt update && apt install nfpm=2.11.3
|
||||
- make package
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
@ -233,7 +233,7 @@ package for linux arm64:
|
|||
GOARCH: "arm64"
|
||||
script:
|
||||
- echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
|
||||
- apt update && apt install nfpm
|
||||
- apt update && apt install nfpm=2.11.3
|
||||
- make package
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -1453,8 +1453,8 @@ func TestLogQuery(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "QueryPQLReq",
|
||||
req: &pb.QueryPQLRequest{Pql: "Count(All())"},
|
||||
expected: fmt.Sprintf("GRPC: %v, %v, %v, %v, %v, %v\n", "", []string{}, "test!", uinfo.UserID, uinfo.UserName, "Count(All())"),
|
||||
req: &pb.QueryPQLRequest{Index: "index", Pql: "Count(All())"},
|
||||
expected: fmt.Sprintf("GRPC: %v, %v, %v, %v, %v, %v\n", "", []string{}, "test!", uinfo.UserID, uinfo.UserName, "[index]Count(All())"),
|
||||
},
|
||||
}
|
||||
for _, test := range cases {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue