There's a bunch of ways, easiest one is through your _AddLogChar procedure at your shard log database, check for the event IDs (4,6) then check if the character is a GM then show your notice or whatever.
As much as I remember:
Code:
Game Enter | EventID = 4
Game Leave | EventID = 6