diff options
| author | Julie Qiu <julie@golang.org> | 2020-10-15 16:08:55 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2020-10-16 15:32:07 +0000 |
| commit | 77c99373df9821c08e0634bbb9af4b5851759d32 (patch) | |
| tree | 4cde5dbd84c01e80328d57058c191b3b5acef043 /internal/database/database.go | |
| parent | aa1467d6386b41f7a0ad89dcfe113c9f41b9ef5a (diff) | |
| download | go-x-pkgsite-77c99373df9821c08e0634bbb9af4b5851759d32.tar.xz | |
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>
Diffstat (limited to 'internal/database/database.go')
| -rw-r--r-- | internal/database/database.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/internal/database/database.go b/internal/database/database.go index fc82059c..d4dfc031 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -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) }() |
