首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >.NET ETW -非预期关键字- SessionN

.NET ETW -非预期关键字- SessionN
EN

Stack Overflow用户
提问于 2015-09-14 18:45:59
回答 2查看 136关注 0票数 1

在.NET 4.5上使用Microsoft.Diagnostis.Tracing.* ETW最终结果以某种方式为所有日志创建了额外的关键字: Session0,Session1,Session2,Session3

这甚至发生在ETW库示例代码中

是否存在已知问题?

EN

回答 2

Stack Overflow用户

发布于 2015-09-17 14:41:39

http://www.shujaat.net/2013/09/net-45-eventsource-windows-event-log.html?showComment=1410351588387#c5917443851300280552

看起来像是一个已知的问题

我确实可以在清单文件中找到这些有趣的关键字。

票数 0
EN

Stack Overflow用户

发布于 2019-03-08 10:00:33

source

它是由eventsource.cs中的CreateManifestAndDescriptors()创建的(参见第3346行)

代码语言:javascript
复制
// Use reflection to look at the attributes of a class, and generate a manifest for it (as UTF8) and
// return the UTF8 bytes.  It also sets up the code:EventData structures needed to dispatch events
// at run time.  'source' is the event source to place the descriptors.  If it is null,
// then the descriptors are not creaed, and just the manifest is generated.  
private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string eventSourceDllName, EventSource source,
    EventManifestOptions flags = EventManifestOptions.None)
{
    ///...
    // ensure we have keywords for the session-filtering reserved bits
    // 
    {
        manifest.AddKeyword("Session3", (long)0x1000 << 32);
        manifest.AddKeyword("Session2", (long)0x2000 << 32);
        manifest.AddKeyword("Session1", (long)0x4000 << 32);
        manifest.AddKeyword("Session0", (long)0x8000 << 32);
    }
//...
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32562869

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档