diff options
| author | Brandon Miller <brandon@vector35.com> | 2026-05-22 15:44:53 -0400 |
|---|---|---|
| committer | Brandon Miller <brandon@vector35.com> | 2026-05-27 08:36:26 -0400 |
| commit | 8fbf9ca9c0c32c600008dc6d85cacf84276736f8 (patch) | |
| tree | dfac45c21a5ce7902cfedc96ecf4effdf4808832 /rust/src/logger.rs | |
| parent | 8bb4ab351a7a0f371ca758ed82ca50085e6c50fd (diff) | |
Rust APIs for custom function lifters
Diffstat (limited to 'rust/src/logger.rs')
| -rw-r--r-- | rust/src/logger.rs | 8 |
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. /// |
