Skip to content

Commit

Permalink
torii - Log events in debug!() as hex
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzn committed Jan 19, 2024
1 parent 87599f9 commit 92d9a5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/torii/core/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use starknet::providers::Provider;
use tokio::sync::broadcast::Sender;
use tokio::sync::mpsc::Sender as BoundedSender;
use tokio::time::sleep;
use tracing::{error, info, warn};
use tracing::{debug, error, info, warn};

use crate::processors::{BlockProcessor, EventProcessor, TransactionProcessor};
use crate::sql::Sql;
Expand Down Expand Up @@ -253,6 +253,10 @@ impl<'db, P: Provider + Sync> Engine<'db, P> {
processor
.process(&self.world, self.db, block, invoke_receipt, event_id, event)
.await?;
} else {
let keys: Vec<String> = event.keys.iter().map(|k| format!("{:#x}", k)).collect();
let data: Vec<String> = event.data.iter().map(|d| format!("{:#x}", d)).collect();
debug!("Event {{ keys: {:?}, data: {:?} }}", keys, data);

Check warning on line 259 in crates/torii/core/src/engine.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/core/src/engine.rs#L259

Added line #L259 was not covered by tests
}
}
Ok(())
Expand Down

0 comments on commit 92d9a5b

Please sign in to comment.