Skip to content

Commit 000e78c

Browse files
committed
feat: support new event kinds
1 parent c936c89 commit 000e78c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/tracer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ impl Tracer {
155155
self.events.push(TraceLowLevelEvent::Return(ReturnRecord { return_value }));
156156
}
157157

158+
// TODO: add metadata arg
158159
pub fn register_special_event(&mut self, kind: EventLogKind, content: &str) {
159160
self.events.push(TraceLowLevelEvent::Event(RecordEvent {
160161
kind,
162+
metadata: "".to_string(),
161163
content: content.to_string(),
162164
}));
163165
}

src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ pub enum TypeSpecificInfo {
303303
#[derive(Debug, Clone, Serialize, Deserialize)]
304304
pub struct RecordEvent {
305305
pub kind: EventLogKind,
306+
pub metadata: String,
306307
pub content: String,
307308
}
308309

@@ -444,8 +445,10 @@ pub enum EventLogKind {
444445
#[default]
445446
Write,
446447
WriteFile,
448+
WriteOther,
447449
Read,
448450
ReadFile,
451+
ReadOther,
449452
// not used for now
450453
ReadDir,
451454
OpenDir,

0 commit comments

Comments
 (0)