示例#1
0
文件: raft.go 项目: XiangrongFan/etcd
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()
	}))
}
示例#2
0
文件: raft.go 项目: nkhuyu/cockroach
// 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{})
}
示例#3
0
文件: raft.go 项目: hvaara/cockroach
// 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()})
}