[−][src]Struct libstrophe::Logger
Wrapper around the underlying xmpp_log_t
struct.
The best option to get a logger is to call Logger::default()
. It will return you a logger that
is tied into Rust logging facility provided by log
crate. This functionality is available when
compiling with the default rust-log
feature.
This struct implements:
Eq
by comparing internal pointersHash
by hashing internal pointerSend
Methods
impl<'cb> Logger<'cb>
[src]
pub fn new<CB>(handler: CB) -> Self where
CB: FnMut(LogLevel, &str, &str) + Send + 'cb,
[src]
CB: FnMut(LogLevel, &str, &str) + Send + 'cb,
Create a new custom logger.
The callback argument will be called every time a log message needs to be printed.
pub fn new_internal(log_level: LogLevel) -> Logger<'static>
[src]
This method returns default libstrophe
logger that just outputs log lines to stderr. Use it
if you compile without rust-log
feature and want a quick debug log output.
pub fn new_null() -> Logger<'static>
[src]
This method returns null logger that doesn't output any information.
pub fn as_inner(&self) -> *const xmpp_log_t
[src]
Trait Implementations
impl<'_> Send for Logger<'_>
[src]
impl<'_> Drop for Logger<'_>
[src]
impl Default for Logger<'static>
[src]
fn default() -> Self
[src]
Return a new logger that logs to standard Rust logging facilities.
Logging facilities are provided by log
crate. Only available when compiling with rust-log
feature.
impl<'_> Eq for Logger<'_>
[src]
impl<'_> PartialEq<Logger<'_>> for Logger<'_>
[src]
impl<'_> Debug for Logger<'_>
[src]
impl<'_> Hash for Logger<'_>
[src]
Auto Trait Implementations
impl<'cb> !Sync for Logger<'cb>
impl<'cb> Unpin for Logger<'cb>
impl<'cb> !UnwindSafe for Logger<'cb>
impl<'cb> !RefUnwindSafe for Logger<'cb>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,