pub struct Logger { /* private fields */ }Implementations§
Source§impl Logger
impl Logger
Sourcepub fn new_with_session(name: &str, session_id: SessionId) -> Ref<Logger>
pub fn new_with_session(name: &str, session_id: SessionId) -> Ref<Logger>
Create a logger scoped with the specific SessionId, hiding the logs when the session
is not active in the UI.
§Example
Typically, you will want to retrieve the SessionId from the BinaryView file metadata
Logger::new_with_session("MyLogger", bv.file().session_id());Sourcepub fn session_id(&self) -> Option<SessionId>
pub fn session_id(&self) -> Option<SessionId>
Sourcepub fn log(&self, level: BnLogLevel, msg: &str)
pub fn log(&self, level: BnLogLevel, msg: &str)
Send a log to the logger instance.
If you do not have a Logger you may call bn_log or bn_log_with_session.
Trait Implementations§
Source§impl Ord for Logger
impl Ord for Logger
Source§impl PartialOrd for Logger
impl PartialOrd for Logger
Source§impl ToOwned for Logger
impl ToOwned for Logger
impl Eq for Logger
impl Send for Logger
impl StructuralPartialEq for Logger
impl Sync for Logger
Auto Trait Implementations§
impl Freeze for Logger
impl RefUnwindSafe for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more