sdlog2: add failsafe state logging