From 311c332fdc19e682bad16440e13a315b3226bce1 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Wed, 3 Sep 2014 11:13:29 -0500 Subject: [PATCH] More logging --- conn.go | 2 +- query.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index 5b7dfc5a..02b8c4b5 100644 --- a/conn.go +++ b/conn.go @@ -571,7 +571,7 @@ func (c *Conn) Exec(sql string, arguments ...interface{}) (commandTag CommandTag defer func() { if err == nil { endTime := time.Now() - c.logger.Info("Exec", "sql", sql, "args", arguments, "time", endTime.Sub(startTime)) + c.logger.Info("Exec", "sql", sql, "args", arguments, "time", endTime.Sub(startTime), "commandTag", commandTag) } else { c.logger.Error("Exec", "sql", sql, "args", arguments, "error", err) } diff --git a/query.go b/query.go index 8ef8655e..d19e44de 100644 --- a/query.go +++ b/query.go @@ -71,7 +71,7 @@ func (rows *Rows) close() { if rows.err == nil { endTime := time.Now() - rows.logger.Info("Query", "sql", rows.sql, "args", rows.args, "time", endTime.Sub(rows.startTime)) + rows.logger.Info("Query", "sql", rows.sql, "args", rows.args, "time", endTime.Sub(rows.startTime), "rowCount", rows.rowCount) } else { rows.logger.Error("Query", "sql", rows.sql, "args", rows.args) }