storagefsm: Fix too-long log handling

This commit is contained in:
Łukasz Magiera 2021-05-30 19:24:42 +02:00 committed by Jennifer Wang
parent b0128bd99e
commit 0a5a7cf45d

View File

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