Skip to content

Commit 77c9937

Browse files
committed
internal/database: only log QueryRow debug info if error
QueryRow debug info is only logged now if there is an error. Logging on every call resulted in too much noise. For golang/go#39629 Change-Id: I5e5be0b1b4bdeda0ebe2618a7036fbf521c225a7 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262702 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
1 parent aa1467d commit 77c9937

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

internal/database/database.go

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ func (db *DB) QueryRow(ctx context.Context, query string, args ...interface{}) *
114114
msg := fmt.Sprintf("args=%v; elapsed=%q, start=%q, deadline=%q", args, time.Since(start), start, d)
115115
if ctx.Err() != nil {
116116
log.Errorf(ctx, "QueryRow context error: %v "+msg, ctx.Err())
117-
} else {
118-
log.Debugf(ctx, "QueryRow: "+msg)
119117
}
120118
logQuery(ctx, query, args, db.instanceID)(nil)
121119
}()

0 commit comments

Comments
 (0)