We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dd18b8 commit c0110abCopy full SHA for c0110ab
src/log.rs
@@ -55,7 +55,17 @@ impl Logger {
55
56
impl Log for Logger {
57
fn log(&mut self, op: Operation) -> std::io::Result<()> {
58
- let span = span!(Level::DEBUG, "log", op = ?op);
+ let op_type = match &op {
59
+ Operation::Insert { .. } => "insert",
60
+ Operation::Update { .. } => "update",
61
+ Operation::Delete { .. } => "delete",
62
+ };
63
+ let op_id = match &op {
64
+ Operation::Insert { id, .. } => id,
65
+ Operation::Update { id, .. } => id,
66
+ Operation::Delete { id } => id,
67
68
+ let span = span!(Level::DEBUG, "log", op_type, op_id);
69
let _enter = span.enter();
70
71
if self.file.metadata()?.len() > self.rotation_threshold {
0 commit comments