MDL-40908 test: added function to generate a tag
MDL-40908 core_tag: replaced 'update' add_to_log calls with an event