summaryrefslogtreecommitdiff
path: root/rust/src/logger.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/logger.rs')
-rw-r--r--rust/src/logger.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/logger.rs b/rust/src/logger.rs
index c928287f..c06f4dfc 100644
--- a/rust/src/logger.rs
+++ b/rust/src/logger.rs
@@ -66,8 +66,8 @@ impl Logger {
}
}
- pub fn name(&self) -> BnString {
- unsafe { BnString::from_raw(BNLoggerGetName(self.handle.as_ptr())) }
+ pub fn name(&self) -> String {
+ unsafe { BnString::into_string(BNLoggerGetName(self.handle.as_ptr())) }
}
pub fn session_id(&self) -> usize {
@@ -144,7 +144,7 @@ impl log::Log for Ref<Logger> {
BNLog(
self.session_id(),
level,
- logger_name.as_ptr(),
+ logger_name.as_ptr() as *const c_char,
0,
percent_s.as_ptr(),
msg.as_ptr(),