As I mentioned in A Poor Dynamics Plugin, diagnosing an issue can be challenging in Dynamics CRM Online. I have not yet had the pleasure of working with an on-premise install of Dynamics. To simplify debugging issues in my plugins, I felt it was desirable to log to a centralized log server.
I'd like to show you a slightly modified version of a plugin. This was the first piece of code I had ever seen for the purpose of extending Microsoft Dynamics' backend.