Windows Event Log Analysis Splunk App Build a great reporting interface using Splunk, one of the leaders in the Security Information and Event Management (SIEM) field, linking the collected Windows events to www.eventid.net. Apr 18, 2012 If MS development is capable of writing the code to GENERATE an event, then surely they also possess the arcane technical skills required to actually DOCUMENT it along with what it means, and the conditions that trigger it. Technically you can use any values between 1 - 65536 for that. But if you are someone who writes tons of verbose log like me you will find it difficult to relate a bunch of entries together then I would suggest to generate a random unique value every time the code executes with this you can identify the events, even the much better idea would be to create your own log & source to use this.
![]()
Active2 years, 1 month ago
Is there any ranges of valid event IDs which should be used by custom applications while logging to Windows EventLog? Or I can use any event ID of my choice (1,2,3,4..).P.S, I am developing in C#.NET.
Vinod Srivastav
1,90611 gold badge1313 silver badges2424 bronze badges
NiranNiran
62611 gold badge66 silver badges1010 bronze badges
5 Answers
EventIds are application specific so you can use whatever ranges you like. Just ensure you document what you have used and where so that you can ensure you don't use an id twice, or to facilitate easier debugging.
But keep in mind.. Coldplay free download.
Like when Henry Ford said 'you can have any color you want as long as it's black' - you can also use whatever range you like as long as that range falls inside the range of 0 and 65535.
Community♦
MartinMartin
29.2k1919 gold badges8787 silver badges125125 bronze badges
Microsoft Event Log Codes For Iphone
Sure enough, it is up to the author to define and track event IDs they use and what they mean.
Here is a reference: http://msdn.microsoft.com/en-us/library/e29k5ebc.aspx - Particularly interesting is the part about not writing messages with IPv6 addresses (because of the % character) to the event log. I bet you can use a parameter to work around that though.
colbybhearncolbybhearn
The hi bits of the ID are reserved for testing, debug and other flags used for development. The usable bits are:
0x0000 - 0xffff
See: Event Message Structure
The upper bits should be avoided but all values for the bottom bits are available if you create a custom source. If you use a system or pre-existing source you will collide and likely get the wrong message. Messages are taken from the registered sources message DLL file. A custom message file can be built using the message file compiler from the SDK.
JRVJRV
Edit1: I tested that and it is not true that eventID is 32bits. It is only 16 bits.
eventId is Int32, from -2,147,483,648 to 2,147,483,647
Microsoft Event Log Codes Today
EventLog.WriteEntry Method (String, String, EventLogEntryType, Int32)
MrHIDEnMrHIDEn
Microsoft Event Log Codes For Sale
Technically you can use any values between 1 - 65536 for that.
Dom casual bold font free. But if you are someone who writes tons of verbose log like me you will find it difficult to relate a bunch of entries together then I would suggest to generate a random unique value every time the code executes with this you can identify the events, even the much better idea would be to create your own log & source to use this instead of writing everything in the Application log.like
Vinod SrivastavVinod Srivastav
1,90611 gold badge1313 silver badges2424 bronze badges
Not the answer you're looking for? Browse other questions tagged c#windowsevent-log or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |