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/container/network | |
| 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/container/network')
| -rw-r--r-- | plugins/warp/src/container/network/client.rs | 11 |
1 files changed, 6 insertions, 5 deletions
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 ); |
