@@ -389,7 +389,8 @@ func (c *Conn) Exec(ctx context.Context, sql string, arguments ...interface{}) (
|
|||||||
commandTag, err := c.exec(ctx, sql, arguments...)
|
commandTag, err := c.exec(ctx, sql, arguments...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if c.shouldLog(LogLevelError) {
|
if c.shouldLog(LogLevelError) {
|
||||||
c.log(ctx, LogLevelError, "Exec", map[string]interface{}{"sql": sql, "args": logQueryArgs(arguments), "err": err})
|
endTime := time.Now()
|
||||||
|
c.log(ctx, LogLevelError, "Exec", map[string]interface{}{"sql": sql, "args": logQueryArgs(arguments), "err": err, "time": endTime.Sub(startTime)})
|
||||||
}
|
}
|
||||||
return commandTag, err
|
return commandTag, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user