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. --- arch/msp430/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'arch/msp430/src/lib.rs') diff --git a/arch/msp430/src/lib.rs b/arch/msp430/src/lib.rs index b5465554..892e617d 100644 --- a/arch/msp430/src/lib.rs +++ b/arch/msp430/src/lib.rs @@ -1,7 +1,3 @@ -extern crate binaryninja; -extern crate log; -extern crate msp430_asm; - use binaryninja::{ add_optional_plugin_dependency, architecture::ArchitectureExt, @@ -9,7 +5,6 @@ use binaryninja::{ custom_binary_view::{BinaryViewType, BinaryViewTypeExt}, Endianness, }; -use log::LevelFilter; mod architecture; mod flag; @@ -17,12 +12,12 @@ mod lift; mod register; use architecture::Msp430; -use binaryninja::logger::Logger; #[no_mangle] #[allow(non_snake_case)] pub extern "C" fn CorePluginInit() -> bool { - Logger::new("MSP430").with_level(LevelFilter::Info).init(); + binaryninja::tracing_init!("MSP430"); + let arch = binaryninja::architecture::register_architecture("msp430", |custom_handle, handle| { Msp430::new(handle, custom_handle) -- cgit v1.3.1