Skip to content

Commit

Permalink
Enhance error message
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Jun 7, 2024
1 parent 4bd1e2c commit 62ab574
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/proc/yrreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ func (y *YRestartReader) Restart(offsetStart int64) error {
if y.underlying != nil {
_ = y.underlying.Close()
}
ylogger.Zero.Debug().Str("object-path", y.name).Int64("offset", offsetStart).Msg("cat object with offset")
if offsetStart != 0 {
ylogger.Zero.Debug().Str("object-path", y.name).Msg("cat object with offset")
} else {
ylogger.Zero.Error().Str("object-path", y.name).Int64("offset", offsetStart).Msg("cat object with offset after possible error")
}
r, err := y.s.CatFileFromStorage(y.name, offsetStart)
if err != nil {
return err
Expand Down

0 comments on commit 62ab574

Please sign in to comment.