// get a log message
344692
func (bl *BeeLogger) StealOne() (level int, msg string, ok bool) {
	lm := <-bl.steal
	if lm == nil {
		return 0, "", false
	}
	return lm.level, lm.msg, true
}
900482
func (r *raftLog) GetLog(idx uint64, log *raft.Log) error {
	r.RLock()
	tx, err := r.conn.Begin(false)
	if err != nil {
		r.RUnlock()
		return err
	}
	var key [8]byte
	binary.BigEndian.PutUint64(key[:], idx)
	bucket := tx.Bucket(logsBucket)
	val := bucket.Get(key[:])
	if val == nil {
		err = raft.ErrLogNotFound
	} else {
		err = r.decodeRaftLog(val, log)
	}
	tx.Rollback()
	r.RUnlock()
	return err
}
551551
func GetMessage(err error) string {
	if err == nil {
		return ""
	}
	cast, ok := err.(*Error)
	if !ok {
		return err.Error()
	}
	return cast.Message()
}
1031345
func (c *Client) logf(msg string, args ...interface{}) {
	c.Logger.Printf(msg, args...)
}
897082
func (p *gateway) getLogger(loadedConfig *config.GatewayConfig) log.Logger {
	out := p.getLogOutput(loadedConfig)
	useJSON := *loadedConfig.LogFormat == "json"
	if useJSON {
		return log.NewJSONLogger(out, log.DefaultErrorHandler)
	}
	return log.NewLogfmtLogger(out, log.DefaultErrorHandler)
}
1352620
func (s *messageStoreImpl) Get() []interface{} {
	res := make([]interface{}, 0)

	s.lock.RLock()
	defer s.lock.RUnlock()

	for _, msg := range s.messages {
		if !msg.expired {
			res = append(res, msg.data)
		}
	}
	return res
}
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)
}
835135
func (info *peerGroupInfo) getLogMessage() string {
	lines := []string{
		fmt.Sprintf("calculating desired peer group\ndesired voting members: (maxId: %d)", info.maxMemberId),
	}

	template := "\n   %#v: rs_id=%d, rs_addr=%s"
	ids := make([]string, 0, len(info.recognised))
	for id := range info.recognised {
		ids = append(ids, id)
	}
	sortAsInts(ids)
	for _, id := range ids {
		rm := info.recognised[id]
		lines = append(lines, fmt.Sprintf(template, info.machines[id], rm.Id, rm.Address))
	}

	if len(info.extra) > 0 {
		lines = append(lines, "\nother members:")

		template := "\n   rs_id=%d, rs_addr=%s, tags=%v, vote=%t"
		for _, em := range info.extra {
			vote := em.Votes != nil && *em.Votes > 0
			lines = append(lines, fmt.Sprintf(template, em.Id, em.Address, em.Tags, vote))
		}
	}

	return strings.Join(lines, "")
}
114837
func Log(msg string, v ...interface{}) {
	fmt.Printf("     %s\n", colors.Purple(fmt.Sprintf(msg, v...)))
}
794244
func (l *Logs) Get(index int) (log *Log, _ error) {
	if index < 0 || index >= len(l.logs) {
		return nil, errors.New("index out of bounds")
	}
	return &Log{l.logs[index]}, nil
}
1336314
func (lo Logger) Log(pr Priority, me ...interface{}) {
	logMessage(lo, pr, me)
}
735549
func (i *Import) GetMessage() string {
	if i == nil || i.Message == nil {
		return ""
	}
	return *i.Message
}
594070
func (s *syncLogStore) GetLog(index uint64, log *raft.Log) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.store.GetLog(index, log)
}
69476
func (l *logger) Log(level Level, msg string, pairs ...interface{}) {
	if level <= l.Level {
		m := l.message(pairs...)
		l.Println(msg, m)
	}
}
1154685
func (m *MemLogger) Get(lvl logging.Level, msg string, data map[string]interface{}) *LogEntry {
	return m.GetFunc(func(ent *LogEntry) bool {
		return ent.Level == lvl && ent.Msg == msg && reflect.DeepEqual(data, ent.Data)
	})
}
810527
func GetLogger(url, apiKey string) (*Logger, error) {
	l, err := createLogger(url, apiKey, false, 0)
	return l, err
}
806591
func (sc *StatementContext) GetMessage() string {
	sc.mu.Lock()
	msg := sc.mu.message
	sc.mu.Unlock()
	return msg
}