Update log and index.