I've tried logging errors in my application, using the EventLog
class.. But the Event Viewer on Windows 2003 Server is very limited as far as displaying the stuff I log.
Here's what I'm doing:
if (!EventLog.SourceExists("TestApp.exe"))
{
EventLog.CreateEventSource("TestApp.exe", "TestApp");
}
EventLog.WriteEntry("TestApp.exe", Exception.Message);
The entry shows up in the Event Viewer, but I can't seem to find the the exception-message anywhere in the interface.
Am I doing something wrong? Or is the Event Viewer in Windows 2003 Server just crap? Are there any alternatives, beyond dumping errors to a text-file?