// trace print sql log
331171
func (scope *Scope) trace(t time.Time) {
	if len(scope.SQL) > 0 {
		scope.db.slog(scope.SQL, t, scope.SQLVars...)
	}
}
540504
func (d *Debugger) Recorded() (recorded bool, tracedir string) {
	d.processMutex.Lock()
	defer d.processMutex.Unlock()
	return d.target.Recorded()
}
538335
func (e *Error) Trace(fields ...string) *Error {
	if e == nil {
		return nil
	}

	e.lock.Lock()
	defer e.lock.Unlock()

	return e.trace(fields...)
}
1329075
func Tracef(msg string, args ...interface{}) {
	if level >= TraceLevel {
		TraceLog.Printf(msg, args...)
	}
}
271806
func (l *Logger) TraceD(title string, data map[string]interface{}) {
	data["title"] = title
	l.logWithLevel(Trace, data)
}
780045
func (l *Log) Print(args ...interface{}) {
	if l.loadCustomLogger() {
		l.customLogger.Print(args...)
		return
	}
	l.deflogger.Print(args...)
}
326506
func Tracef(format string, args ...interface{}) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.Tracef(format, args...)
}
1196561
func (p *PackageLogger) Tracef(format string, args ...interface{}) {
	if p.level < TRACE {
		return
	}
	p.Logf(TRACE, format, args...)
}
1017712
func (me *Logger) Tracef(format string, v ...interface{}) {
	me.printf(Ptrace, format, v...)
}
1141338
func (writer *baseFileWriter) Tracef(format string, args ...interface{}) {
	if nil == writer.blog || TRACE < writer.blog.Level() {
		return
	}

	writer.writef(TRACE, format, args...)
}
1204345
func Trace(err error) error {
	if err == nil {
		return nil
	}

	buf := make([]byte, 1024)
	sz := runtime.Stack(buf, false)

	return &TraceError{
		error: err,
		trace: string(buf[:sz]),
	}
}
462721
func (s *Server) Tracef(format string, v ...interface{}) {
	if atomic.LoadInt32(&s.logging.trace) == 0 {
		return
	}

	s.executeLogCall(func(logger Logger, format string, v ...interface{}) {
		logger.Tracef(format, v...)
	}, format, v...)
}
342670
func (r *Route) Trace(handlers ...Handler) *Route {
	return r.group.add("TRACE", r.path, handlers)
}
343927
func (logger *Logger) Tracef(m string, args ...interface{}) {
	logger.log(TRACE, m, args...)
}
723175
func (e *Error) Trace() (s string) {
	for err := e; err != nil; err = err.next {
		s = s + fmt.Sprintln(err)
	}
	return
}
338117
func (r Route) Trace() string {
	printfmt := fmt.Sprintf("%s:", r.Method)
	if r.Subdomain != "" {
		printfmt += fmt.Sprintf(" %s", r.Subdomain)
	}
	printfmt += fmt.Sprintf(" %s ", r.Tmpl().Src)

	if l := r.RegisteredHandlersLen(); l > 1 {
		printfmt += fmt.Sprintf("-> %s() and %d more", r.MainHandlerName, l-1)
	} else {
		printfmt += fmt.Sprintf("-> %s()", r.MainHandlerName)
	}

	// printfmt := fmt.Sprintf("%s: %s >> %s", r.Method, r.Subdomain+r.Tmpl().Src, r.MainHandlerName)
	// if l := len(r.Handlers); l > 0 {
	// 	printfmt += fmt.Sprintf(" and %d more", l)
	// }
	return printfmt // without new line.
}
248597
func trace(message string, err error) {
	pc := make([]uintptr, 10)
	runtime.Callers(2, pc)
	f := runtime.FuncForPC(pc[0])
	file, line := f.FileLine(pc[0])
	if err != nil {
		log.Printf("%s:%d %s: %s\n", file, line, f.Name(), err)
	} else {
		log.Printf("%s:%d %s: %s\n", file, line, f.Name(), message)
	}
}