We have several reference designs for Power Manager devices that show how to detect a power supply fault (over voltage or under voltage) and save the data in a SPI memory. Using a current to voltage circuit the fault could also be an over current. The following reference designs describe how the Power Manager devices can detect and log faults.
RD1062 Three-Wire Power Supply Fault Logging Lattice Semiconductor Using Lattice Programmable Logic
RD1072 Power Supply Fault Detection Using the Power Manager II POWR1014
RD1077 Fault Monitoring and Logging Using Platform Manager Devices