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/convert/types.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/warp/src/convert') diff --git a/plugins/warp/src/convert/types.rs b/plugins/warp/src/convert/types.rs index f8ead6af..227df2ea 100644 --- a/plugins/warp/src/convert/types.rs +++ b/plugins/warp/src/convert/types.rs @@ -6,6 +6,7 @@ use binaryninja::calling_convention::CoreCallingConvention as BNCallingConventio use binaryninja::confidence::Conf as BNConf; use binaryninja::confidence::MAX_CONFIDENCE; use binaryninja::rc::Ref as BNRef; +use binaryninja::tracing; use binaryninja::types::BaseStructure as BNBaseStructure; use binaryninja::types::EnumerationBuilder as BNEnumerationBuilder; use binaryninja::types::FunctionParameter as BNFunctionParameter; @@ -361,7 +362,7 @@ pub fn to_bn_type(arch: Option, ty: &Type) -> BNRef )) } _ => { - log::error!( + tracing::error!( "Adding base {:?} with invalid ty: {:?}", ty.name, member.ty @@ -470,7 +471,7 @@ pub fn to_bn_type(arch: Option, ty: &Type) -> BNRef ntr_name, ), None => { - log::error!("Referrer with no reference! {:?}", c); + tracing::error!("Referrer with no reference! {:?}", c); NamedTypeReference::new( NamedTypeReferenceClass::UnknownNamedTypeClass, "AHHHHHH", -- cgit v1.3.1