// Send a closure log message internally
195975
func (log Logger) intLogc(lvl level, closure func() string) {

	log.intLogNamec(logName(lvl), lvl, closure)
}
249244
func (eng *Engine) log(format string, args ...interface{}) {
	fmt.Fprintf(os.Stderr, "[%p]: %v", eng.transport, fmt.Sprintf(format, args...))
}
269233
func (l *Logger) Warn(msg interface{}, data ...interface{}) {
	if l.shouldAppend(WARN) {
		l.makeLog(msg, WARN, data)
	}
}
20841
func (de *DefaultExtender) Log(logFlags LogFlags, msgLevel LogFlags, msg string) {
	if logFlags&msgLevel == msgLevel {
		log.Println(msg)
	}
}
84852
func (h *Handler) HandleLog(e *log.Entry) error {
	switch e.Level {
	case log.DebugLevel:
		return h.logger.Dbgm(e.Fields, e.Message)
	case log.InfoLevel:
		return h.logger.Infom(e.Fields, e.Message)
	case log.WarnLevel:
		return h.logger.Warnm(e.Fields, e.Message)
	case log.ErrorLevel:
		return h.logger.Errm(e.Fields, e.Message)
	case log.FatalLevel:
		return h.logger.Critm(e.Fields, e.Message)
	}

	return nil
}
1005308
func (p *PackageLogger) Log(l LogLevel, args ...interface{}) {
	p.internalLog(calldepth, l, fmt.Sprint(args...))
}
796605
func (client Client) Send(records []logfwd.Record) error {
	for _, rec := range records {
		msg, err := messageFromRecord(rec)
		if err != nil {
			return errors.Trace(err)
		}
		if err := client.Sender.Send(msg); err != nil {
			return errors.Trace(err)
		}
	}
	return nil
}
16147
func DebugLog(logname string, arg0 interface{}, args ...interface{}) error {
	const (
		lvl = DEBUG
	)
	switch first := arg0.(type) {
	case string:
		// Use the string as a format string
		Global.intLogNamef(logname, lvl, first, args...)
	case func() string:
		// Log the closure (no other arguments used)
		Global.intLogNamec(logname, lvl, first)
	default:
		// Build a format string so that it will be similar to Sprint
		Global.intLogNamef(logname, lvl, fmt.Sprint(arg0)+strings.Repeat(" %v", len(args)), args...)
	}
	return nil
}
165545
func (l *intLogger) Error(msg string, args ...interface{}) {
	l.Log(Error, msg, args...)
}
605522
func (d *logDrain) Send(message string) error {
	if d.muted {
		return nil
	}
	d.mutex.Lock()
	defer d.mutex.Unlock()
	conn, err := d.getConnection(false)
	if err != nil {
		return err
	}
	_, err = fmt.Fprintln(conn, message)
	if err != nil {
		// Try again with a new connection in case the issue was a broken pipe
		conn, err = d.getConnection(true)
		if err != nil {
			return err
		}
		_, err = fmt.Fprintln(conn, message)
		if err != nil {
			return err
		}
	}
	return nil
}
64633
func (l *Logger) Error(msg interface{}, data ...interface{}) {
	if l.shouldAppend(ERROR) {
		l.makeLog(msg, ERROR, data)
	}
}
1218590
func (cl *Call) Log(arguments ...interface{}) {
	cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
}
672473
func (r *RingLogger) Log(msg *Message) error {
	if r.closed() {
		return errClosed
	}
	return r.buffer.Enqueue(msg)
}
1204117
func SendStackTraceMessageAndExit(logger grip.Journaler, m interface{}) {
	if p := recover(); p != nil {
		logAndExit(p, logger, message.ConvertToComposer(level.Critical, m))
	}
}
23831
func Send(msg *Message) {
	mailQueue <- msg

	if setting.HookMode {
		<-msg.confirmChan
		return
	}

	go func() {
		<-msg.confirmChan
	}()
}
623360
func (m *Message) SendCallback(fn CallbackFunc, arg interface{}) error {
	s, err := newSocket()
	if err != nil {
		return err
	}
	defer s.free()

	if errno := C.genl_connect(s.nls); errno != 0 {
		return &Error{errno, "failed to connect to netlink"}
	}
	defer C.nl_close(s.nls)

	cbArg := &callbackArg{fn: fn, arg: arg}
	cbID := registerCallback(cbArg)
	defer unregisterCallback(cbArg)

	if errno := C._nl_socket_modify_cb(s.nls, C.NL_CB_VALID, C.NL_CB_CUSTOM, (C.nl_recvmsg_msg_cb_t)(unsafe.Pointer(C.callbackGateway)), C.uintptr_t(cbID)); errno != 0 {
		return &Error{errno, "failed to modify callback"}
	}
	// nl_send_auto_complete returns number of bytes sent or a negative
	// errno on failure.
	if errno := C.nl_send_auto_complete(s.nls, m.nlm); errno < 0 {
		return &Error{errno, "failed to send netlink message"}
	}
	if errno := C.nl_recvmsgs_default(s.nls); errno != 0 {
		return &Error{errno, "failed to receive messages"}
	}
	return nil
}
363331
func (cs *ConsensusState) sendInternalMessage(mi msgInfo) {
	select {
	case cs.internalMsgQueue <- mi:
	default:
		// NOTE: using the go-routine means our votes can
		// be processed out of order.
		// TODO: use CList here for strict determinism and
		// attempt push to internalMsgQueue in receiveRoutine
		cs.Logger.Info("Internal msg queue is full. Using a go-routine")
		go func() { cs.internalMsgQueue <- mi }()
	}
}