Extracted baseLogActivity for common functionality.