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