Browse Source

go fmt

pull/2353/head
Chris Lu 3 years ago
parent
commit
1e3fdf366f
  1. 2
      weed/util/log_buffer/log_buffer.go

2
weed/util/log_buffer/log_buffer.go

@ -189,7 +189,7 @@ func (m *LogBuffer) ReadFromBuffer(lastReadTime time.Time) (bufferCopy *bytes.Bu
defer m.RUnlock() defer m.RUnlock()
if !m.lastFlushTime.IsZero() && m.lastFlushTime.After(lastReadTime) { if !m.lastFlushTime.IsZero() && m.lastFlushTime.After(lastReadTime) {
if time.Now().Sub(m.lastFlushTime) < m.flushInterval * 2 {
if time.Now().Sub(m.lastFlushTime) < m.flushInterval*2 {
diff := m.lastFlushTime.Sub(lastReadTime) diff := m.lastFlushTime.Sub(lastReadTime)
glog.V(4).Infof("lastFlush:%v lastRead:%v diff:%v", m.lastFlushTime, lastReadTime, diff) glog.V(4).Infof("lastFlush:%v lastRead:%v diff:%v", m.lastFlushTime, lastReadTime, diff)
return nil, ResumeFromDiskError return nil, ResumeFromDiskError

Loading…
Cancel
Save