mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
[event log] Expose event keywords and publisher guid
Accessing the publisher guid is useful to setup an ETW trace, and we need to know event keywords in order to activate the ETW session on the correct "channels".
This commit is contained in:
@@ -443,6 +443,10 @@ class ChannelConfig(EvtHandle):
|
||||
"TEST"
|
||||
return [EvtPublisher(pub) for pub in chaninfo(self, gdef.EvtChannelPublisherList).value]
|
||||
|
||||
@property
|
||||
def keywords(self):
|
||||
return int(chaninfo(self, gdef.EvtChannelPublishingConfigKeywords).value)
|
||||
|
||||
@property
|
||||
def enabled(self):
|
||||
return bool(chaninfo(self, gdef.EvtChannelConfigEnabled).value)
|
||||
@@ -546,6 +550,15 @@ class PublisherMetadata(EvtHandle):
|
||||
raise
|
||||
return sbuff.value
|
||||
|
||||
@property
|
||||
def guid(self):
|
||||
"""The GUID associated with this provider
|
||||
|
||||
:type: [:class:`GUID`] -- the GUID in a XXXXXXXXXX-YYYY-ZZZZ-TTTT-VVVVVVVVVV form
|
||||
"""
|
||||
return publishinfo(self, gdef.EvtPublisherMetadataPublisherGuid).value
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return '<{0} "{1}">'.format(type(self).__name__, self.name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user