KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am able to currently create a Windows Event Log using the following code: string sSource; string sLog; string sEvent; sSource = "Sample App"; sLog = "Application"; sEvent = "Sample Event"; if (!EventLog.SourceExists(sSource)) EventLog.CreateEventSource(sSource,sLog); EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 11111); This creates a log in the Application Log. I want to add more than one line of data to the event in the event log so that while debugging I can parse the log directly for the problems. Also, I looked at some of the other logs in the Application logs and they seem to have a binary data field in them. I was not able to figure out as to how to write such a field because the above piece of code only adds an EventData field.
Tags (comma-separated)
Save Edits
Cancel