fix stream log issue, replace print log error with warning (#4433)

pull/4436/head
Gheis Mohammadi 1 year ago committed by GitHub
parent a18e1e44bf
commit 81c2fb06c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      api/service/stagedstreamsync/staged_stream_sync.go

@ -403,7 +403,7 @@ func (s *StagedStreamSync) Run(db kv.RwDB, tx kv.RwTx, firstCycle bool) error {
return err return err
} }
if err := printLogs(tx, s.timings); err != nil { if err := printLogs(tx, s.timings); err != nil {
return err utils.Logger().Warn().Err(err).Msg("print timing logs failed")
} }
s.currentStage = 0 s.currentStage = 0
return nil return nil
@ -440,8 +440,8 @@ func printLogs(tx kv.RwTx, timings []Timing) error {
} }
} }
if len(logCtx) > 0 { if len(logCtx) > 0 {
utils.Logger().Info(). timingLog := fmt.Sprintf("Timings (slower than 50ms) %v", logCtx)
Msgf(WrapStagedSyncMsg(fmt.Sprintf("Timings (slower than 50ms) %v", logCtx...))) utils.Logger().Info().Msgf(WrapStagedSyncMsg(timingLog))
} }
if tx == nil { if tx == nil {

Loading…
Cancel
Save