예제 #1
0
func (r *Repo) log(typ string, start time.Time, query string, args []interface{}) {
	log.
		Ctx(r.logCtx()).
		WithField("args", args).
		WithField("sql", query).
		WithField("dur", time.Since(start).String()).
		Debugf("sql: %s", typ)
}
예제 #2
0
func (r *Repo) logRollback() {
	log.Ctx(r.logCtx()).Debug("sql: rollback")
}
예제 #3
0
func (r *Repo) logCommit() {
	log.Ctx(r.logCtx()).Debug("sql: commit")
}
예제 #4
0
func (r *Repo) logBegin() {
	log.Ctx(r.logCtx()).Debug("sql: begin")
}