Create function log_activation()