Finish database log