summaryrefslogtreecommitdiff
path: root/rust/src/logger.rs
diff options
context:
space:
mode:
authorBrandon Miller <brandon@vector35.com>2026-05-22 15:44:53 -0400
committerBrandon Miller <brandon@vector35.com>2026-05-27 08:36:26 -0400
commit8fbf9ca9c0c32c600008dc6d85cacf84276736f8 (patch)
treedfac45c21a5ce7902cfedc96ecf4effdf4808832 /rust/src/logger.rs
parent8bb4ab351a7a0f371ca758ed82ca50085e6c50fd (diff)
Rust APIs for custom function lifters
Diffstat (limited to 'rust/src/logger.rs')
-rw-r--r--rust/src/logger.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/src/logger.rs b/rust/src/logger.rs
index 66e594fd..d2903a5a 100644
--- a/rust/src/logger.rs
+++ b/rust/src/logger.rs
@@ -57,6 +57,14 @@ impl Logger {
Self::new_with_session(name, LOGGER_DEFAULT_SESSION_ID)
}
+ pub fn ref_from_raw(handle: *mut BNLogger) -> Ref<Logger> {
+ unsafe {
+ Ref::new(Logger {
+ handle: NonNull::new(handle).unwrap(),
+ })
+ }
+ }
+
/// Create a logger scoped with the specific [`SessionId`], hiding the logs when the session
/// is not active in the UI.
///