// Log a message at LEVEL_ALERT with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
330619
func (l *Logger) Alertm(attrs map[string]interface{}, format string, va ...interface{}) error {
	return l.logMsg(attrs, LEVEL_ALERT, format, va...)
}
407474
func Emergm(attrs map[string]interface{}, format string, va ...interface{}) error {
	return logDefaultMsg(attrs, LEVEL_EMERG, format, va...)
}
200999
func LogLevel(levelString string) (LoggingLevel, error) {
	l, err := logging.LogLevel(levelString)
	level := LoggingLevel(l)
	if err != nil {
		level = LogError
	}
	return level, err
}
962651
func (l Levels) Warn() log.Logger {
	return log.WithPrefix(l.logger, l.levelKey, l.warnValue)
}
600277
func (w *Writer) Alert(m string) (err error) {
	_, err = w.writeAndRetry(LOG_ALERT, m)
	return err
}
19154
func (logger *Logger) logf(level Level, format string, v ...interface{}) {
	if int32(level) >= atomic.LoadInt32((*int32)(&logger.level)) {
		if logger.runtime || logger.sync {
			message := fmt.Sprintf(format, v...)
			message = logger.genLog(level, message)
			logger.flushMsg(message)
		} else {
			r := new(request)
			r.level = level
			r.format = format
			r.v = v
			logger.request <- *r
		}
	}
}
362282
func (l *Log) Warn(args ...interface{}) {
	opts := getLoggerOpts(l.module, api.WARNING)
	if !opts.levelEnabled {
		return
	}
	if l.loadCustomLogger() {
		l.customLogger.Warn(args...)
		return
	}
	l.log(opts, api.WARNING, args...)
}
558025
func Alert(message string, fields ...interface{}) uint64 {
	return DefaultLogger().Event(event.Alert, message, fields...)
}
1355429
func (e Entry) Alertf(s string, v ...interface{}) {
	e.Message = fmt.Sprintf(s, v...)
	e.Level = AlertLevel
	HandleEntry(e)
}
1139208
func (s *Syslog) Log(e log.Entry) {
	s.once.Do(func() {
		s.formatter = s.formatFunc(s)
	})
	line := string(s.formatter(e))

	switch e.Level {
	case log.DebugLevel:
		_ = s.writer.Debug(line)
	case log.InfoLevel:
		_ = s.writer.Info(line)
	case log.NoticeLevel:
		_ = s.writer.Notice(line)
	case log.WarnLevel:
		_ = s.writer.Warning(line)
	case log.ErrorLevel:
		_ = s.writer.Err(line)
	case log.PanicLevel, log.AlertLevel:
		_ = s.writer.Alert(line)
	case log.FatalLevel:
		_ = s.writer.Crit(line)
	}
}
76172
func (s *Server) Alert(msg string) {
	s.logStatus("requesting alert: " + msg)
	for conn := range s.connSet.conns {
		conn.alertChan <- msg
	}
}
1366844
func Errm(attrs map[string]interface{}, format string, va ...interface{}) error {
	return logDefaultMsg(attrs, LEVEL_ERR, format, va...)
}
908043
func (log Logger) Logf(lvl level, format string, args ...interface{}) {
	log.intLogf(lvl, format, args...)
}
81722
func (o *Options) log(message string, LogLevel int, logVars ...interface{}) {
	if LogLevel <= o.LogLevel && !o.SkipLogging {
		o.Logger.Printf("[%s] [%s] "+message, append([]interface{}{LogLevelStrings[LogLevel]}, logVars...)...)
	}
}
598262
func (h *TextHandler) Log(logger_name string, level LogLevel, msg string,
	calldepth int) {
	h.mtx.RLock()
	output, template := h.output, h.template
	h.mtx.RUnlock()
	event := LogEvent{
		LoggerName: logger_name,
		Level:      level,
		Message:    strings.TrimRight(msg, "\n\r"),
		Timestamp:  time.Now()}
	if calldepth >= 0 {
		_, event.Filepath, event.Line, _ = runtime.Caller(calldepth + 1)
	}
	var buf bytes.Buffer
	err := template.Execute(&buf, &event)
	if err != nil {
		output.Output(level, []byte(
			fmt.Sprintf("log format template failed: %s", err)))
		return
	}
	output.Output(level, buf.Bytes())
}
755395
func (n *panicLogger) Log(keyvals ...interface{}) {
	r := keyvals
	if n.err != nil {
		r = append(r[0:len(r):len(r)], n.err)
	}
	buf := &bytes.Buffer{}
	f := LogfmtLogger{
		Out:             buf,
		MissingValueKey: Msg,
	}
	if err := f.Log(r...); err != nil {
		panic(r)
	}
	panic(buf.String())
}
149122
func (lgr *logger) LogAtLevel(level LogPriority, format string, v ...interface{}) {
	switch level {
	case DEBUG:
		lgr.Debug(format, v...)
	case INFO:
		lgr.Info(format, v...)
	case WARNING:
		lgr.Warn(format, v...)
	case ERR:
		lgr.Error(format, v...)
	}
}