In the Windows 7 and Server 2008 Event Viewer there is a folder for…
Applications and Services Logs
I want to create a place where all events from my application are logged. How do you create a log under this area? From the event viewer, all I see is “Create View” which appears to simply be a way to create a filtered view of events in a particular log.
Once this is created, how do you write events to it?
For example if my log is named ‘StackApp’, would you just use…
EventLog.WriteEntry('StackApp', message);
Thanks!
if your EventLog was created then you can do
EventLog.WriteEntry("StackApp", message);More operation on log: