Expand description
§windows-eventlog-native
The 0.2 series implements native EvtQuery / EvtNext / EvtRender
iteration and structured XML parsing for local Windows Event Log channels.
Powers OPSEC self-check: after running a scan, ask the log directly
“did I light up 4624/4625/4648/4662/4768/4769/4776?” without shelling out to
wevtutil or Get-WinEvent.
use windows_eventlog_native::{EventLog, QueryDirection};
let iter = EventLog::query(
"Application",
"*[System[TimeCreated[timediff(@SystemTime) <= 3600000]]]",
QueryDirection::Forward,
)?;
for evt in iter.take(10) {
let evt = evt?;
println!("{} {} {}", evt.time_created, evt.event_id, evt.provider);
}Re-exports§
pub use error::Error;pub use error::Result;pub use event::filetime_to_utc;pub use event::parse_event_xml;pub use event::rendered_xml;pub use event::Event;pub use query::EventLog;pub use query::QueryDirection;pub use security::security_audit_by_id;