From 168a3fd34824adc9c6a606cd144219701f15cccf Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 17 Dec 2025 21:23:46 -0500 Subject: [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. --- plugins/warp/src/plugin/load.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/warp/src/plugin/load.rs') diff --git a/plugins/warp/src/plugin/load.rs b/plugins/warp/src/plugin/load.rs index 0b8d1672..bd0e4838 100644 --- a/plugins/warp/src/plugin/load.rs +++ b/plugins/warp/src/plugin/load.rs @@ -10,6 +10,7 @@ use binaryninja::interaction::{ MessageBoxIcon, }; use binaryninja::rc::Ref; +use binaryninja::tracing; use std::collections::HashMap; use std::path::PathBuf; use std::sync::atomic::AtomicBool; @@ -130,7 +131,7 @@ impl LoadSignatureFile { let file = match LoadSignatureFile::read_file(&view, source_file_path.clone()) { Ok(file) => file, Err(e) => { - log::error!("Failed to read signature file: {}", e); + tracing::error!("Failed to read signature file: {}", e); return; } }; @@ -156,7 +157,7 @@ impl LoadSignatureFile { } let container_source = DiskContainerSource::new(source_file_path.clone(), file); - log::info!("Loading container source: '{}'", container_source.path); + tracing::info!("Loading container source: '{}'", container_source.path); let mut map = HashMap::new(); map.insert(source_file_path.to_source_id(), container_source); let container = DiskContainer::new("Loaded signatures".to_string(), map); -- cgit v1.3.1