// 设置全局log实时显示终端
165306
func (self *Logic) SetLog(w io.Writer) App {
	logs.Log.SetOutput(w)
	return self
}
1091222
func (k *LoggerKit) Log(keyvals ...interface{}) error {
	k.LogTo.Log(keyvals...)
	return nil
}
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)
}
984815
func (l *syncLogger) Log(keyvals ...interface{}) error {
	l.mu.Lock()
	err := l.logger.Log(keyvals...)
	l.mu.Unlock()
	return err
}
1108210
func (l Logger) log(logFunc func(string) error, format string, a ...interface{}) error {
	return logFunc(l.sprintf(format, a...))
}
1362208
func Log(serviceName string, methodName string, request proto.Message, response proto.Message, err error, duration time.Duration) {
	if err != nil {
		Error(serviceName, methodName, request, response, err, duration)
	} else {
		Info(serviceName, methodName, request, response, err, duration)
	}
}
900903
func (l *DefaultLogger) Log(level int, msg string, args []interface{}) {
	// log if the log level (warn=4) >= level of message (err=3)
	if l.level < level || silent {
		return
	}
	l.formatter.Format(l.writer, level, msg, args)
}
639812
func (l *Logger) log(level Level, e *Entry, msg string) {
	if level < l.Level {
		return
	}

	if err := l.Handler.HandleLog(e.finalize(level, msg)); err != nil {
		stdlog.Printf("error logging: %s", err)
	}
}
353565
func (flag *OutputFlag) Log(s string) (int, error) {
	if len(s) > 0 && s[0] == '\r' {
		flag.Write([]byte{'\r', 033, '[', 'K'})
		s = s[1:]
	}

	return flag.WriteString(time.Now().Format("[02-01-06 15:04:05] ") + s)
}
1273677
func Log(str string, args ...interface{}) {
	str = fmt.Sprintf(str, args...)

	cstr := C.CString(str)
	defer C.free(unsafe.Pointer(cstr))

	C._SDL_Log(cstr)
}
1147062
func (s *Session) log(msgL int, format string, a ...interface{}) {

	if msgL > s.LogLevel {
		return
	}

	msglog(msgL, 2, format, a...)
}
960063
func (h *Handler) Log(e log.Entry) {
	h.m.Lock()
	_ = h.Encoder.Encode(e)
	h.m.Unlock()
}
49624
func (l *Logger) log(keyvals ...interface{}) error {
	if l.logMutex == nil {
		l.logMutex = new(sync.Mutex)
	}

	l.logMutex.Lock()
	defer l.logMutex.Unlock()

	var writer io.Writer
	if l.Writer == nil {
		writer = os.Stdout
	} else {
		writer = l.Writer
	}

	var formatter Formatter
	if l.Formatter == nil {
		formatter = JSONFormatter{}
	} else {
		formatter = l.Formatter
	}

	var err = formatter.Format(writer, append(l.context, keyvals...)...)
	return err
}
1019553
func (l *SwapLogger) Log(keyvals ...interface{}) error {
	s, ok := l.logger.Load().(loggerStruct)
	if !ok || s.Logger == nil {
		return nil
	}
	return s.Log(keyvals...)
}
255554
func (l *Hierarchy) Log(kvs ...interface{}) {
	// Note: Log here messes up "caller" :/
	if logger := l.loadLogger(); logger != nil {
		logger.Log(kvs...)
	}
}
1117057
func (l *ChannelLogger) Log(data Data) error {
	l.channel <- data
	return nil
}
6594
func (l *Logger) log(str string) (n int, err error) {
	return fmt.Fprint(l.sink, str)
}