diff options
| author | Mason Reed <mason@vector35.com> | 2025-12-17 21:23:46 -0500 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-01-11 10:36:01 -0800 |
| commit | 168a3fd34824adc9c6a606cd144219701f15cccf (patch) | |
| tree | 9bbac31ece5ea6ab6627998d995a77f7f7e2f8e6 /plugins/warp/src/plugin/debug.rs | |
| parent | ca91bc1933976c62d24248f0f7c35af38451ff11 (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/plugin/debug.rs')
| -rw-r--r-- | plugins/warp/src/plugin/debug.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |
