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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more