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/file.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/warp/src/plugin/file.rs') diff --git a/plugins/warp/src/plugin/file.rs b/plugins/warp/src/plugin/file.rs index ec61bd78..899e3f46 100644 --- a/plugins/warp/src/plugin/file.rs +++ b/plugins/warp/src/plugin/file.rs @@ -1,6 +1,7 @@ use crate::report::ReportGenerator; use binaryninja::binary_view::{BinaryView, BinaryViewExt}; use binaryninja::command::Command; +use binaryninja::tracing; pub struct ShowFileReport; @@ -15,12 +16,12 @@ impl Command for ShowFileReport { }; let Ok(bytes) = std::fs::read(&path) else { - log::error!("Failed to read file: {:?}", path); + tracing::error!("Failed to read file: {:?}", path); return; }; let Some(file) = warp::WarpFile::from_bytes(&bytes) else { - log::error!("Failed to parse file: {:?}", path); + tracing::error!("Failed to parse file: {:?}", path); return; }; -- cgit v1.3.1