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/container/network/client.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/warp/src/container/network') diff --git a/plugins/warp/src/container/network/client.rs b/plugins/warp/src/container/network/client.rs index 9f68180b..d3c94d1a 100644 --- a/plugins/warp/src/container/network/client.rs +++ b/plugins/warp/src/container/network/client.rs @@ -5,6 +5,7 @@ use crate::container::{ }; use base64::Engine; use binaryninja::download::DownloadProvider; +use binaryninja::tracing; use serde::Deserialize; use serde_json::json; use std::collections::HashMap; @@ -496,14 +497,14 @@ impl NetworkClient { let kind = match item.kind.as_str() { "function" => { let Some(data) = &item.data else { - log::warn!( + tracing::warn!( "Function item {} has no data from network, skipping...", item.id ); continue; }; let Some(func) = Function::from_bytes(&data) else { - log::warn!( + tracing::warn!( "Function item {} has invalid data from network, skipping...", item.id ); @@ -514,7 +515,7 @@ impl NetworkClient { "source" => ContainerSearchItemKind::Source { path: match item.name { None => { - log::warn!("Source item {} has no name", item.id); + tracing::warn!("Source item {} has no name", item.id); continue; } Some(name) => SourcePath(format!("{}/{}", self.server_url, name).into()), @@ -523,14 +524,14 @@ impl NetworkClient { }, "type" => { let Some(data) = &item.data else { - log::warn!( + tracing::warn!( "Type item {} has no data from network, skipping...", item.id ); continue; }; let Some(ty) = Type::from_bytes(&data) else { - log::warn!( + tracing::warn!( "Type item {} has invalid data from network, skipping...", item.id ); -- cgit v1.3.1