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/workflow_objc/src/lib.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/workflow_objc/src/lib.rs') diff --git a/plugins/workflow_objc/src/lib.rs b/plugins/workflow_objc/src/lib.rs index 8c859c6b..5b41b6d0 100644 --- a/plugins/workflow_objc/src/lib.rs +++ b/plugins/workflow_objc/src/lib.rs @@ -1,4 +1,4 @@ -use binaryninja::{add_optional_plugin_dependency, logger::Logger, settings::Settings}; +use binaryninja::{add_optional_plugin_dependency, settings::Settings, tracing}; mod activities; mod error; @@ -8,15 +8,11 @@ mod workflow; pub use error::Error; use metadata::GlobalState; -use log::LevelFilter; - fn plugin_init() -> bool { - Logger::new("Plugin.Objective-C") - .with_level(LevelFilter::Debug) - .init(); + binaryninja::tracing_init!("Plugin.Objective-C"); if workflow::register_activities().is_err() { - log::warn!("Failed to register Objective-C workflow"); + tracing::warn!("Failed to register Objective-C workflow"); return false; }; -- cgit v1.3.1