In the previous post about installing heartbeat, i mentioned decision time as a choice between rules aproach and writing custom loggings based on own events.
In this page, i will show a couple of events where i hooked into to log activity for. The message template being used is one of your choice (here only as example).
Note that the becoming friends is little more difficult because there can be a logging duplicate needed to make things work. In that case we alter the logging by giving a duplicate flag.