// LogCall implements the logging.Logger interface.
555655
func (m *MemLogger) LogCall(lvl logging.Level, calldepth int, format string, args []interface{}) {
	if m.lock != nil {
		m.lock.Lock()
		defer m.lock.Unlock()
	}
	if m.data == nil {
		m.data = new([]LogEntry)
	}
	*m.data = append(*m.data, LogEntry{lvl, fmt.Sprintf(format, args...), m.fields, calldepth + 1})
}
255554
func (l *Hierarchy) Log(kvs ...interface{}) {
	// Note: Log here messes up "caller" :/
	if logger := l.loadLogger(); logger != nil {
		logger.Log(kvs...)
	}
}
222897
func (l *Logger) Error(a ...interface{}) {
	l.logAll(optError, fmt.Sprint(a...))
}
700677
func Caller() *Call {
	scope, entry := findScope()
	if scope == nil {
		return nil
	}
	return &Call{
		scope: scope,
		entry: entry,
	}
}
1237950
func (f Function) Call(args ...interface{}) error {
	if !f.IsValid() {
		return errors.New("invalid function")
	}
	return f.Caller.Call(args...)
}
1154804
func (c callHandler) Log(log *log15.Record) error {
	ctx := log.Ctx
	var ctxMap ContextMap
	if len(ctx) > 0 {
		ctxMap = make(ContextMap, len(ctx)/2)

		for i := 0; i < len(ctx); i += 2 {
			v := ctx[i]
			key, ok := v.(string)
			if !ok {
				key = fmt.Sprintf("LOGGER_INVALID_KEY %v", v)
			}
			var value interface{}
			if len(ctx) > i+1 {
				value = ctx[i+1]
			} else {
				value = "LOGGER_VALUE_MISSING"
			}
			ctxMap[key] = value
		}
	} else {
		ctxMap = make(ContextMap, 0)
	}
	r := &Record{Message: log.Msg, Context: ctxMap, Time: log.Time, Level: LogLevel(log.Lvl), Call: CallStack(log.Call)}
	return c(r)
}
1212174
func LogEvent(logger Logger, event *logutilpb.Event) {
	switch event.Level {
	case logutilpb.Level_INFO:
		logger.InfoDepth(1, EventString(event))
	case logutilpb.Level_WARNING:
		logger.WarningDepth(1, EventString(event))
	case logutilpb.Level_ERROR:
		logger.ErrorDepth(1, EventString(event))
	case logutilpb.Level_CONSOLE:
		// Note we can't just pass the string, because it might contain '%'.
		logger.Printf("%s", EventString(event))
	}
}
157850
func Logger(l *log.Logger) TokenLimiterOption {
	return func(tl *TokenLimiter) error {
		tl.log = l
		return nil
	}
}
860828
func (c *C) log(args ...interface{}) {
	c.writeLog([]byte(fmt.Sprint(args...) + "\n"))
}
148428
func (f HandlerFunc) Log(logger_name string, level LogLevel, msg string,
	calldepth int) {
	f(logger_name, level, msg, calldepth)
}
1054184
func (ctrl *Controller) RecordCall(receiver interface{}, method string, args ...interface{}) *Call {
	ctrl.T.Helper()

	recv := reflect.ValueOf(receiver)
	for i := 0; i < recv.Type().NumMethod(); i++ {
		if recv.Type().Method(i).Name == method {
			return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...)
		}
	}
	ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver)
	panic("unreachable")
}
425679
func (v *MrbValue) Call(method string, args ...Value) (*MrbValue, error) {
	return v.call(method, args, nil)
}
52093
func (ie *InitEvent) call() {
	log.Debug("OnInit callbacks executing")
	defer log.Debug("OnInit callbacks finished")
	for _, ev := range *ie {
		ev()
	}
}
1117057
func (l *ChannelLogger) Log(data Data) error {
	l.channel <- data
	return nil
}
1180128
func (l *withLogger) LogWith(level Level, calldepth int, data []byte, format string, args ...interface{}) {
	if l.GetLevel() >= level {
		l.output(level, calldepth, data, format, args...)
	}
}
1009067
func (s *StanLogger) Debugf(format string, v ...interface{}) {
	s.executeLogCall(func(log Logger, format string, v ...interface{}) {
		// This is running under the protection of StanLogging's lock
		if s.debug {
			log.Debugf(format, v...)
		}
	}, format, v...)
}
38072
func caller() (file string, line int) {
	var ok bool
	_, file, line, ok = runtime.Caller(2)
	if !ok {
		file = "???"
		line = 1
	} else {
		slash := strings.LastIndex(file, "/")
		if slash >= 0 {
			file = file[slash+1:]
		}
	}
	return
}