You can use the "MessageDLL for EventLog" sample to log events using DirectScript's Event Logger object.
The message DLL is a binary file containing only message strings. The format of such a message DLL is different from other standard executable files. All messages that are displayed through Event Viewer (a standard utility that comes with Windows) must be stored in the message DLL.
This MessageDLL sample is a Visual C project that generates the required DLL. You would also find a text file (Messages.mc). This file contains the message strings that you want to put in the DLL. You can edit and modify this text file to add new messages or delete some others as per your requirements. If any change is made to this text file, you would need to re-compile the complete project to generate the DLL.