Windows 事件日志记录中的数据名称
为了使 Windows 上的自定义事件日志易于解析和结构化,我正在利用消息资源文件,其解释如下:http://msdn.microsoft.com/en-us/library/windows/desktop/aa363669(v=vs.85).aspx
我正在查看 Windows 的 xml 格式自己的日志,我已经看到输入到特定事件的参数(通过其 ID 定义)被命名。安全审核访问的示例具有如下标签:
<EventData>
<Data Name="SubjectUserSid">S-1-0-00-00000000-00000-0......</Data>
<Data Name="SubjectUserName">myUserName</Data>
<Data Name="SubjectDomainName">myDomain</Data>
<Data Name="SubjectLogonId">0x1234...</Data>
and so on....
</EventData>
问题是我找不到定义数据名称的格式。我可以将字符串作为参数来创建 ;字符串数据
。我想它可以在 mc 资源文件或 c# 代码 EventLog 类上设置。但我不知道如何以及哪一个。
In order to make my custom event logs on Windows easily parsable and structured, I am utilizing Message Resource files which is explained here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363669(v=vs.85).aspx
I was looking at the xml format of Windows' own logs and I've seen that the parameters entered to the particular events(which are defined via their ID) are named. An example from Security-Audit access has tags as following:
<EventData>
<Data Name="SubjectUserSid">S-1-0-00-00000000-00000-0......</Data>
<Data Name="SubjectUserName">myUserName</Data>
<Data Name="SubjectDomainName">myDomain</Data>
<Data Name="SubjectLogonId">0x1234...</Data>
and so on....
</EventData>
The problem is that I can't find the format to define data names. I can give strings as parameters which create <data> string data </data>
. I guess it could be either set on mc resource file or on the c# code EventLog class. But how and which one, I couldn't figure out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论