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
Trust: Julie Qiu
Run-TryBot: Julie Qiu
TryBot-Result: kokoro
@@ -114,8 +114,6 @@ func (db *DB) QueryRow(ctx context.Context, query string, args ...interface{}) *
msg := fmt.Sprintf("args=%v; elapsed=%q, start=%q, deadline=%q", args, time.Since(start), start, d)
if ctx.Err() != nil {
log.Errorf(ctx, "QueryRow context error: %v "+msg, ctx.Err())
- } else {
- log.Debugf(ctx, "QueryRow: "+msg)
}
logQuery(ctx, query, args, db.instanceID)(nil)
}()
