// Tracef trace log for debugging details
343927
func (logger *Logger) Tracef(m string, args ...interface{}) {
	logger.log(TRACE, m, args...)
}
1115210
func (l logf) Debugf(s string, args ...interface{}) {
	l.log.Debug(s, args...)
}
447975
func (api *PrivateDebugAPI) traceTx(ctx context.Context, message core.Message, vmctx vm.Context, statedb *state.StateDB, config *TraceConfig) (interface{}, error) {
	// Assemble the structured logger or the JavaScript tracer
	var (
		tracer vm.Tracer
		err    error
	)
	switch {
	case config != nil && config.Tracer != nil:
		// Define a meaningful timeout of a single transaction trace
		timeout := defaultTraceTimeout
		if config.Timeout != nil {
			if timeout, err = time.ParseDuration(*config.Timeout); err != nil {
				return nil, err
			}
		}
		// Constuct the JavaScript tracer to execute with
		if tracer, err = tracers.New(*config.Tracer); err != nil {
			return nil, err
		}
		// Handle timeouts and RPC cancellations
		deadlineCtx, cancel := context.WithTimeout(ctx, timeout)
		go func() {
			<-deadlineCtx.Done()
			tracer.(*tracers.Tracer).Stop(errors.New("execution timeout"))
		}()
		defer cancel()

	case config == nil:
		tracer = vm.NewStructLogger(nil)

	default:
		tracer = vm.NewStructLogger(config.LogConfig)
	}
	// Run the transaction with tracing enabled.
	vmenv := vm.NewEVM(vmctx, statedb, api.eth.blockchain.Config(), vm.Config{Debug: true, Tracer: tracer})

	ret, gas, failed, err := core.ApplyMessage(vmenv, message, new(core.GasPool).AddGas(message.Gas()))
	if err != nil {
		return nil, fmt.Errorf("tracing failed: %v", err)
	}
	// Depending on the tracer type, format and return the output
	switch tracer := tracer.(type) {
	case *vm.StructLogger:
		return &ethapi.ExecutionResult{
			Gas:         gas,
			Failed:      failed,
			ReturnValue: fmt.Sprintf("%x", ret),
			StructLogs:  ethapi.FormatLogs(tracer.StructLogs()),
		}, nil

	case *tracers.Tracer:
		return tracer.GetResult()

	default:
		panic(fmt.Sprintf("bad tracer type %T", tracer))
	}
}
604075
func TraceHandler() gin.HandlerFunc {
	return func(ctx *gin.Context) {
		pprof.Trace(ctx.Writer, ctx.Request)
	}
}
123588
func TraceID(ctx context.Context) zap.Field {
	if span := opentracing.SpanFromContext(ctx); span != nil {
		if spanContext, ok := span.Context().(jaeger.SpanContext); ok {
			return zap.String("trace_id", spanContext.TraceID().String())
		}
	}
	return zap.Skip()
}
672664
func (l *Logger) Tracee(err error) {
	if l.getLevel() <= Trace && err != nil {
		l.getHandler().Log(l.name, Trace, err.Error(), 1)
	}
}
430147
func (cl *CallbackLogger) Errorf(format string, v ...interface{}) {
	cl.ErrorDepth(1, fmt.Sprintf(format, v...))
}
1106001
func Trace(format string, err error, fields logrus.Fields, a ...interface{}) {
	if traceEnabled {
		log.WithError(err).WithFields(fields).Debugf(format)
	}
}
549026
func (adm *AdminClient) TraceOn(outputStream io.Writer) {
	// if outputStream is nil then default to os.Stdout.
	if outputStream == nil {
		outputStream = os.Stdout
	}
	// Sets a new output stream.
	adm.traceOutput = outputStream

	// Enable tracing.
	adm.isTraceEnabled = true
}
1329075
func Tracef(msg string, args ...interface{}) {
	if level >= TraceLevel {
		TraceLog.Printf(msg, args...)
	}
}
593341
func (s *logger) Trace(description string, keysAndValues ...interface{}) {
	s.trace(1, description, keysAndValues...)
}
795935
func Trace(tracer *httptrace.ClientTrace) RequestOption {
	return func(req *http.Request) (*http.Request, error) {
		return req.WithContext(httptrace.WithClientTrace(req.Context(), tracer)), nil
	}
}
354909
func (l *Logger) Tracef(format string, v ...interface{}) {
	if l.trace {
		l.logger.Printf(l.traceLabel+format, v...)
	}
}
1103468
func (t LoggerType) Trace(errin error) {
	if errin == nil {
		return
	}

	msgopts, err := t.options.Formatter.formatSkip(errin.Error(), 1, true)
	if err != nil {
		t.options.FallbackLogger.Trace(ErrSlackFormatFailed1.New(err, errin.Error()))
		t.options.FallbackLogger.Trace(errin)
		return
	}

	t.sendMessage(t.options.ChannelError, msgopts...)
}
1324135
func Trace(ie interface{}) string {
	if ie == nil {
		return "nil"
	}
	switch val := ie.(type) {
	case *Error:
		return val.Trace()
	case error:
		return val.Error()
	default:
		panic("invalid type")
	}
}
1160468
func (l *Logger) Debugf(format string, v ...interface{}) {
	if l.debug {
		l.Infof(debugprefix+l.prefix+format, v...)
	}
}
576385
func (q *Queryx) Trace(trace gocql.Tracer) *Queryx {
	q.Query.Trace(trace)
	return q
}