Esempio n. 1
0
func init() {
	raft.SetLogger(capnslog.NewPackageLogger("github.com/coreos/etcd", "raft"))
	expvar.Publish("raft.status", expvar.Func(func() interface{} {
		raftStatusMu.Lock()
		defer raftStatusMu.Unlock()
		return raftStatus()
	}))
}
Esempio n. 2
0
// init installs an adapter to use clog for log messages from raft which
// don't belong to any raft group.
func init() {
	raft.SetLogger(&raftLogger{})
}
Esempio n. 3
0
// init installs an adapter to use clog for log messages from raft which
// don't belong to any range.
func init() {
	raft.SetLogger(&raftLogger{ctx: context.Background()})
}