>I am sure it is simple if everything works. And I have been doing this work long enough to know that things don't always work right. And actually I decided to go back to creating token/sample files. I am concerned that if I write something to the log and the customer finds any problem on the server (at a later date), they will point a finger at me (vendor).
using System;
using System.Diagnostics;
string sSource = "My App";
string sLog ="Application";
string sEvent = ex.Message; // put your text to be read here.
// now write this to the log
//EventLog.CreateEventSource(sSource,sLog); If you were creating your own
EventLog.WriteEntry(sSource,sEvent);
EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234);
HTH