Abstracted logging to log any click event for page elements with a name property.