// StoreLog is used to store a single raft log
338971
func (b *FastLogStore) StoreLog(log *raft.Log) error {
	return b.StoreLogs([]*raft.Log{log})
}
142091
func (c *Cluster) Logs(opts docker.LogsOptions) error {
	node, err := c.getNodeForContainer(opts.Container)
	if err != nil {
		return err
	}
	return wrapError(node, node.Logs(opts))
}
716794
func (l *IoLogger) Log(data Data) error {
	line := fmt.Sprintf("%s\n", BuildLog(data, l.AddTime))
	_, err := l.stream.Write([]byte(line))
	return err
}
1263683
func (p *PushNotification) AddLog(log LogPushEntry) {
	if p.log != nil {
		*p.log = append(*p.log, log)
	}
}
308094
func (b *BoltStore) StoreLogs(logs []*raft.Log) error {
	tx, err := b.conn.Begin(true)
	if err != nil {
		return err
	}
	defer tx.Rollback()

	for _, log := range logs {
		key := uint64ToBytes(log.Index)
		val, err := encodeMsgPack(log)
		if err != nil {
			return err
		}
		bucket := tx.Bucket(dbLogs)
		if err := bucket.Put(key, val.Bytes()); err != nil {
			return err
		}
	}

	return tx.Commit()
}
688955
func BuildLog(data Data, addTime bool) string {
	return strings.Join(BuildLogParts(data, addTime), space)
}
165306
func (self *Logic) SetLog(w io.Writer) App {
	logs.Log.SetOutput(w)
	return self
}
903520
func (logger *Logger) Log(level log.Level, args ...interface{}) {
	logger.output(level, args...)
}
561100
func (s *ServicedStorage) initializeLogging() {
	log.SetOutput(os.Stderr)
	level := log.WarnLevel + log.Level(len(App.Options.Verbose))
	log.SetLevel(level)

	// Include glog output if verbosity is enabled
	if len(App.Options.Verbose) > 0 {
		glog.SetToStderr(true)
		glog.SetVerbosity(len(App.Options.Verbose))
	}
}
1300651
func (s *syncLogStore) StoreLog(log *raft.Log) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.store.StoreLog(log)
}
881020
func (r *raftLog) Close() error {
	r.Lock()
	if r.closed {
		r.Unlock()
		return nil
	}
	r.closed = true
	err := r.conn.Close()
	r.Unlock()
	return err
}
380491
func (rs *RaftStorage) Store(entries []raftpb.Entry, hardstate raftpb.HardState, snapshot raftpb.Snapshot) error {
	if err := rs.wal.Save(hardstate, entries); err != nil {
		return err
	}

	if !raft.IsEmptySnap(snapshot) {
		if err := rs.saveSnap(snapshot); err != nil {
			return err
		}

		if err := rs.ram.ApplySnapshot(snapshot); err != nil {
			if err == raft.ErrSnapOutOfDate {
				rs.lg.Warnf("Attempted to apply out-of-date snapshot at Term %d and Index %d",
					snapshot.Metadata.Term, snapshot.Metadata.Index)
			} else {
				rs.lg.Fatalf("Unexpected programming error: %s", err)
			}
		}
	}

	if err := rs.ram.Append(entries); err != nil {
		return err
	}

	return nil
}
45995
func (w *Worker) LogStore() (raft.LogStore, error) {
	select {
	case <-w.catacomb.Dying():
		err := w.catacomb.Err()
		if err != nil {
			return nil, err
		}
		return nil, ErrWorkerStopped
	case logStore := <-w.logStoreCh:
		return logStore, nil
	}
}
132383
func (app *App) UserLog() string {
	return UserLogDir(app.Name, app.Author, app.Version, app.Opinion)
}
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)
	}
}
1097459
func (r *runtimeVM) ReopenContainerLog(c *Container) error {
	logrus.Debug("runtimeVM.ReopenContainerLog() start")
	defer logrus.Debug("runtimeVM.ReopenContainerLog() end")

	return nil
}
531563
func (l *Logger) Log(format string, args ...interface{}) {
	l.log(1, false, format, args...)
}