Create a log when user join/abandoned in a og group in Drupal 7 I'm creating a log with several actions in drupal.

I need register in a custom log when a user requests to join a group. Then I need register that the user has joined in the group or has abandoned this.

Appreciate any guidance to investigate. Thanks :)
Heartbeat module is the one to try. 

I didn't tested it myself, but I read in its description that it's "an API to log activity".

It seems to support OG activity.