// Fire is the main method which is called every time when logger has an error
// or warning message.
508645
func (h *LoggingHook) Fire(entry *logrus.Entry) error {
	// Get information about subsystem from logging entry field.
	iSubsystem, ok := entry.Data[logfields.LogSubsys]
	if !ok {
		serializedEntry, err := entry.String()
		if err != nil {
			return fmt.Errorf("log entry cannot be serialized and doesn't contain 'subsys' field")
		}
		return fmt.Errorf("log entry doesn't contain 'subsys' field: %s", serializedEntry)
	}
	subsystem, ok := iSubsystem.(string)
	if !ok {
		return fmt.Errorf("type of the 'subsystem' log entry field is not string but %s", reflect.TypeOf(iSubsystem))
	}

	// Increment the metric.
	h.metric.WithLabelValues(entry.Level.String(), subsystem).Inc()

	return nil
}
705467
func (s *ErrorCodeHandlers) Fire(ctx context.Context) {
	statusCode := ctx.GetStatusCode()
	if statusCodeSuccessful(statusCode) {
		return
	}
	ch := s.Get(statusCode)
	if ch == nil {
		ch = s.Register(statusCode, statusText(statusCode))
	}
	ch.Fire(ctx)
}
1220562
func (lhb *LogrusHookBuffer) Fire(logrusEntry *logrus.Entry) error {
	if lhb.targetHook == nil && lhb.targetWriter == nil {
		// Store entry in buffer and return
		lhb.buffer = append(lhb.buffer, logrusEntry)
		return nil
	}

	// Handle entry directly
	return lhb.relayEntry(logrusEntry)
}
681757
func (l *logger) Error(i interface{}) {
	switch v := i.(type) {
	case error:
		l.printLog("[ERROR]", v.Error())
	case fmt.Stringer:
		l.printLog("[ERROR]", v.String())
	default:
		panic("can't print input!")
	}
}
719383
func (l *DefaultLogger) Error(msg string, args ...interface{}) error {
	return l.extractLogError(LevelError, msg, args)
}
61353
func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
	for _, hook := range hooks[level] {
		if err := hook.Fire(entry); err != nil {
			return err
		}
	}

	return nil
}
217201
func (l *Logger) Warn(msg string) error {
	return l.logMsg(nil, LEVEL_WARN, msg)
}
686985
func Warn(logger log.Logger) log.Logger {
	return log.WithPrefix(logger, Key(), WarnValue())
}
583171
func (hook *FluentHook) Fire(entry *logrus.Entry) error {
	var logger *fluent.Fluent
	var err error

	switch {
	case hook.Fluent != nil:
		logger = hook.Fluent
	default:
		logger, err = fluent.New(hook.conf.FluentConfig())
		if err != nil {
			return err
		}
		defer logger.Close()
	}

	// Create a map for passing to FluentD
	data := make(logrus.Fields)
	for k, v := range entry.Data {
		if _, ok := hook.ignoreFields[k]; ok {
			continue
		}
		if fn, ok := hook.filters[k]; ok {
			v = fn(v)
		}
		data[k] = v
	}

	setLevelString(entry, data)
	tag := hook.getTagAndDel(entry, data)
	if tag != entry.Message {
		hook.setMessage(entry, data)
	}

	fluentData := ConvertToValue(data, TagName)
	err = logger.PostWithTime(tag, entry.Time, fluentData)
	return err
}
1264677
func (logs *Logs) Error(v ...interface{}) {
	logs.ERROR().Output(2, fmt.Sprintln(v...))
}
701640
func (l *logger) Error(v ...interface{}) {
	f := extractFields(&v)
	l.send(LevelError, 2, fmt.Sprint(v...), f)
}
1176571
func (w *WrappedRevelCallback) FireEvent(key Event, value interface{}) (response EventResponse) {
	if w.FireEventFunction != nil {
		response = w.FireEventFunction(key, value)
	}
	return
}
1363273
func (s *SimpleLogger) Error(v ...interface{}) {
	if s.level <= core.LOG_ERR {
		s.ERR.Output(2, fmt.Sprint(v...))
	}
	return
}
1288117
func (cl *CallbackLogger) Error(err error) {
	cl.ErrorDepth(1, fmt.Sprintf("%+v", err))
}
874932
func (l *Logger) Error(msg string, fields map[string]interface{}) error {
	return l.Log(LvError, msg, fields)
}
539561
func (e *Event) Fire() bool {
	ret := false
	e.o.Do(func() {
		atomic.StoreInt32(&e.fired, 1)
		close(e.c)
		ret = true
	})
	return ret
}
115858
func (l *Logger) Error(e error) {
	l.Print(l.formatErr(e, ""))
}