fix comment typo and use wait.Forever

This commit is contained in:
hzxuzhonghu 2017-11-14 19:38:10 +08:00
parent 2d64ce5e8e
commit 9a88f15141

View File

@ -46,8 +46,8 @@ func (writer GlogWriter) Write(data []byte) (n int, err error) {
func InitLogs() { func InitLogs() {
log.SetOutput(GlogWriter{}) log.SetOutput(GlogWriter{})
log.SetFlags(0) log.SetFlags(0)
// The default glog flush interval is 30 seconds, which is frighteningly long. // The default glog flush interval is 5 seconds.
go wait.Until(glog.Flush, *logFlushFreq, wait.NeverStop) go wait.Forever(glog.Flush, *logFlushFreq)
} }
// FlushLogs flushes logs immediately. // FlushLogs flushes logs immediately.