Undo log for rollback transaction but redo log for incomplete transaction. This two types of log file are to ensure the data of a transaction safe in different circumstances.