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 /rust/plugin_examples | |
| 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 'rust/plugin_examples')
| -rw-r--r-- | rust/plugin_examples/data_renderer/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rust/plugin_examples/data_renderer/src/lib.rs b/rust/plugin_examples/data_renderer/src/lib.rs index 178402af..97b81f23 100644 --- a/rust/plugin_examples/data_renderer/src/lib.rs +++ b/rust/plugin_examples/data_renderer/src/lib.rs @@ -100,9 +100,8 @@ impl CustomDataRenderer for UuidDataRenderer { #[unsafe(no_mangle)] pub unsafe extern "C" fn CorePluginInit() -> bool { // Initialize logging - binaryninja::logger::Logger::new("UUID Data Renderer") - .with_level(log::LevelFilter::Debug) - .init(); + binaryninja::tracing_init!(); + binaryninja::tracing::info!("Core plugin initialized"); // Register data renderer register_data_renderer(UuidDataRenderer {}); |
