Exemple #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)
}
Exemple #2
0
func (r *Repo) logRollback() {
	log.Ctx(r.logCtx()).Debug("sql: rollback")
}
Exemple #3
0
func (r *Repo) logCommit() {
	log.Ctx(r.logCtx()).Debug("sql: commit")
}
Exemple #4
0
func (r *Repo) logBegin() {
	log.Ctx(r.logCtx()).Debug("sql: begin")
}