event_monitor: Add new crate for event reporting

This crate exposes the abililty for the VMM to set a file that events
should be written to. The event!() macro provides an interface to report
those events allowing the specification of an event source, an event
type and optional extra data. This will be written to the provided file
descriptor as JSON data.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-02-17 11:16:00 +00:00
parent c1d9edbfc0
commit ddbef7450d
4 changed files with 99 additions and 0 deletions

10
Cargo.lock generated
View File

@@ -341,6 +341,16 @@ dependencies = [
"libc",
]
[[package]]
name = "event_monitor"
version = "0.1.0"
dependencies = [
"libc",
"serde",
"serde_derive",
"serde_json",
]
[[package]]
name = "failure"
version = "0.1.8"