storagefsm: Fix too-long log handling

This commit is contained in:
Łukasz Magiera 2021-05-30 19:24:42 +02:00
parent 6e1919c67f
commit f3bf773152

View File

@ -206,6 +206,10 @@ func (m *Sealing) logEvents(events []statemachine.Event, state *SectorInfo) {
continue // don't log on every fsm restart continue // don't log on every fsm restart
} }
if len(e) > 8000 {
e = []byte(string(e[:8000]) + "... truncated")
}
l := Log{ l := Log{
Timestamp: uint64(time.Now().Unix()), Timestamp: uint64(time.Now().Unix()),
Message: string(e), Message: string(e),