CONTRIB-5328: replaced deprecated add_to_log calls with events