Add logging to the activity lifecycle callbacks.