pub struct EtwLogger { /* private fields */ }Expand description
A registered ETW provider.
The provider is unregistered when this is dropped.
Implementations§
Source§impl EtwLogger
impl EtwLogger
Sourcepub fn register(guid: &Guid) -> Result<Self>
pub fn register(guid: &Guid) -> Result<Self>
Registers the provider with the given GUID.
§Errors
Returns Error::Windows if Windows cannot register the provider.
Sourcepub fn enabled(&self, level: u8, keyword: u64) -> bool
pub fn enabled(&self, level: u8, keyword: u64) -> bool
Returns whether an active ETW session accepts the specified level and keyword.
Sourcepub fn write(
&self,
descriptor: &EventDescriptor,
data: &[EventDataDescriptor<'_>],
) -> Result<()>
pub fn write( &self, descriptor: &EventDescriptor, data: &[EventDataDescriptor<'_>], ) -> Result<()>
Writes an event with its payload descriptors in manifest-template order.
This method does not call EtwLogger::enabled first.
§Errors
Returns Error::Windows if Windows rejects the event.
Auto Trait Implementations§
impl Freeze for EtwLogger
impl RefUnwindSafe for EtwLogger
impl Send for EtwLogger
impl Sync for EtwLogger
impl Unpin for EtwLogger
impl UnsafeUnpin for EtwLogger
impl UnwindSafe for EtwLogger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more