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/debug.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/warp/src/plugin/debug.rs') diff --git a/plugins/warp/src/plugin/debug.rs b/plugins/warp/src/plugin/debug.rs index 399dba50..6db491e2 100644 --- a/plugins/warp/src/plugin/debug.rs +++ b/plugins/warp/src/plugin/debug.rs @@ -3,13 +3,13 @@ use crate::{build_function, cache}; use binaryninja::binary_view::BinaryView; use binaryninja::command::{Command, FunctionCommand}; use binaryninja::function::Function; -use binaryninja::ObjectDestructor; +use binaryninja::{tracing, ObjectDestructor}; pub struct DebugFunction; impl FunctionCommand for DebugFunction { fn action(&self, _view: &BinaryView, func: &Function) { - log::info!( + tracing::info!( "{:#?}", build_function(func, || func.lifted_il().ok(), false) ); @@ -25,7 +25,7 @@ pub struct DebugCache; impl Command for DebugCache { fn action(&self, _view: &BinaryView) { for_cached_containers(|c| { - log::info!("Container: {:#?}", c); + tracing::info!("Container: {:#?}", c); }); } @@ -40,7 +40,7 @@ impl Command for DebugInvalidateCache { fn action(&self, view: &BinaryView) { let destructor = cache::CacheDestructor {}; destructor.destruct_view(view); - log::info!("Invalidated all WARP caches..."); + tracing::info!("Invalidated all WARP caches..."); } fn valid(&self, _view: &BinaryView) -> bool { -- cgit v1.3.1