Add Log recovery method and unit test.