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 <[email protected]> Run-TryBot: Julie Qiu <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
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

Lines changed: 0 additions & 2 deletions
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)