internal/postgres: downgrade search logs to debug level
Change-Id: Iacc4acc476d73071f24d9afa0eefa361a155a1db
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/767231
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/postgres/search.go b/internal/postgres/search.go
index ead04bd..ea588fa 100644
--- a/internal/postgres/search.go
+++ b/internal/postgres/search.go
@@ -168,7 +168,7 @@
go func() {
start := time.Now()
estimateResp := db.estimateResultsCount(searchCtx, q)
- log.Info(ctx, searchEvent{
+ log.Debug(ctx, searchEvent{
Type: "estimate",
Latency: time.Since(start),
Err: estimateResp.err,
@@ -185,7 +185,7 @@
go func() {
start := time.Now()
resp := s(db, searchCtx, q, limit, offset)
- log.Info(ctx, searchEvent{
+ log.Debug(ctx, searchEvent{
Type: resp.source,
Latency: time.Since(start),
Err: resp.err,
@@ -200,7 +200,7 @@
for range searchers {
resp = <-responses
if resp.err == nil {
- log.Infof(ctx, "initial search response from searcher %s", resp.source)
+ log.Debugf(ctx, "initial search response from searcher %s", resp.source)
break
} else {
log.Errorf(ctx, "error from searcher %s: %v", resp.source, resp.err)
@@ -217,7 +217,7 @@
select {
case nextResp := <-responses:
if nextResp.err == nil && !nextResp.uncounted {
- log.Infof(ctx, "using counted search results from searcher %s", nextResp.source)
+ log.Debugf(ctx, "using counted search results from searcher %s", nextResp.source)
// use this response since it is counted.
resp = nextResp
break loop
@@ -226,7 +226,7 @@
if estr.err != nil {
return nil, fmt.Errorf("error getting estimated count: %v", estr.err)
}
- log.Info(ctx, "using count estimate")
+ log.Debug(ctx, "using count estimate")
for _, r := range resp.results {
// TODO(b/141182438): this is a hack: once search has been fully
// replaced with fastsearch, change the return signature of this