我正在使用由MSDN非常好地描述的EvtSubscribe API.
一切正常,我成功收到任何发生事件的通知.
令我困扰的是,我偶然发现了一个网络参考,描述了我之前从未见过的事件类型:“活动追踪”.
使用EvtRender API和EvtSystemLevel / EvtSystemKeywords getter获取所有其他(严重,错误,信息等)事件类型.
由于关键字“活动”和“跟踪”会重复用于多个应用程序和基础架构,因此Google搜索充满了误报.
我最好的领导来自我们发现的reference,由不同事件记录收集框架的用户编写:
Microsoft use it to troubleshoot aplications.
Negotiation/SCT exchange. This can happen at the transport later (through
binary data exchange) or message layer (through SOAP message exchanges).
Message encryption/decryption,with signature verification and authentication.
Traces appear in the ambient activity,typically “Process Action.”Authorization and verification. This can happen locally or when communicating
between endpoints.Using Tracing to Troubleshoot Your Application 07001
Activity Tracing in Message Security 07002
当我试图检查这些链接时,我看到这种跟踪机制允许对WCF应用程序进行故障排除.
但是,由于我不是WCF的专家,至少可以说,我不想花费数天时间来设置.NET环境并强制示例WCF应用程序启用此功能并触发此类事件日志.
解决方法
配置监听器时,可以使用EventLogTraceListener.这将产生活动追踪事件.