summaryrefslogtreecommitdiff
path: root/plugins/warp/src/cache.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-12-17 21:23:46 -0500
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-01-11 10:36:01 -0800
commit168a3fd34824adc9c6a606cd144219701f15cccf (patch)
tree9bbac31ece5ea6ab6627998d995a77f7f7e2f8e6 /plugins/warp/src/cache.rs
parentca91bc1933976c62d24248f0f7c35af38451ff11 (diff)
[Rust] Replace `log` with `tracing`
- Added more documentation - Replaced global named logger for plugins, fixing the issue when the CU has multiple (e.g. statically linked demo) - Simplified some misc code This is a breaking change, but I believe there is no better time to make it, we cannot continue to use the `log` crate, it is too limited for our needs.
Diffstat (limited to 'plugins/warp/src/cache.rs')
-rw-r--r--plugins/warp/src/cache.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/warp/src/cache.rs b/plugins/warp/src/cache.rs
index 09ad1444..30c7487c 100644
--- a/plugins/warp/src/cache.rs
+++ b/plugins/warp/src/cache.rs
@@ -11,7 +11,7 @@ use binaryninja::binary_view::{BinaryView, BinaryViewExt};
use binaryninja::function::Function as BNFunction;
use binaryninja::rc::Guard;
use binaryninja::rc::Ref as BNRef;
-use binaryninja::ObjectDestructor;
+use binaryninja::{tracing, ObjectDestructor};
use std::hash::{DefaultHasher, Hash, Hasher};
pub fn register_cache_destructor() {
@@ -31,7 +31,7 @@ impl From<&BinaryView> for ViewID {
fn from(value: &BinaryView) -> Self {
let mut hasher = DefaultHasher::new();
hasher.write_u64(value.original_image_base());
- hasher.write_usize(value.file().session_id());
+ hasher.write_usize(value.file().session_id().0);
Self(hasher.finish())
}
}
@@ -79,6 +79,6 @@ pub struct CacheDestructor;
impl ObjectDestructor for CacheDestructor {
fn destruct_view(&self, view: &BinaryView) {
clear_type_ref_cache(view);
- log::debug!("Removed WARP caches for {:?}", view.file().filename());
+ tracing::debug!("Removed WARP caches for {:?}", view.file().filename());
}
}