I have a .NET application in which I want to write unhandled events to the event viewer. I noticed that there is a directory called "Applications and Services Logs". I would like to create an entry for my application in this directory and write any unhandled events to it. Unfortunately, I can't find any documentation.
Is this even possible? If so, how?
Thanks!
You can create a log entry with this method :
public static void CreateEventSource(
string YourApplication,
string YourLogName )
Doc: 1 : http://msdn.microsoft.com/en-us/library/2awhba7a.aspx
Example : Eventlog
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.