pkg/logutil/zap_raft.go
func NewRaftLoggerFromZapCore(cr zapcore.Core, syncer zapcore.WriteSyncer) raft.Logger {
	// "AddCallerSkip" to annotate caller outside of "logutil"
	lg := zap.New(cr, zap.AddCaller(), zap.AddCallerSkip(1), zap.ErrorOutput(syncer))
	return &zapRaftLogger{lg: lg, sugar: lg.Sugar()}
}
func NewRaftLoggerFromZapCore(cr zapcore.Core, syncer zapcore.WriteSyncer) raft.Logger {
	// "AddCallerSkip" to annotate caller outside of "logutil"
	lg := zap.New(cr, zap.AddCaller(), zap.AddCallerSkip(1), zap.ErrorOutput(syncer))
	return &zapRaftLogger{lg: lg, sugar: lg.Sugar()}
}
func NewRaftLoggerFromZapCore ( cr zapcore . Core , syncer zapcore . WriteSyncer ) raft . Logger { // "AddCallerSkip" to annotate caller outside of "logutil" lg := zap . New ( cr , zap . AddCaller ( ) , zap . AddCallerSkip ( 1 ) , zap . ErrorOutput ( syncer ) ) return & zapRaftLogger { lg : lg , sugar : lg . Sugar ( ) } }
// NewRaftLoggerFromZapCore creates "raft.Logger" from "zap.Core"
// and "zapcore.WriteSyncer".
NewRaftLoggerFromZapCore creates raft . Logger from zap . Core and zapcore . WriteSyncer .