MDL-40060 mod_book: Replace add_to_log with events