adds logging an activity functionality