在.NET 4.5上使用Microsoft.Diagnostis.Tracing.* ETW最终结果以某种方式为所有日志创建了额外的关键字: Session0,Session1,Session2,Session3
这甚至发生在ETW库示例代码中
是否存在已知问题?
发布于 2015-09-17 14:41:39
http://www.shujaat.net/2013/09/net-45-eventsource-windows-event-log.html?showComment=1410351588387#c5917443851300280552
看起来像是一个已知的问题
我确实可以在清单文件中找到这些有趣的关键字。
发布于 2019-03-08 10:00:33

source
它是由eventsource.cs中的CreateManifestAndDescriptors()创建的(参见第3346行)
// 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);
}
//...
}https://stackoverflow.com/questions/32562869
复制相似问题