Struct cm_logger::scoped::ScopedLogger
source · pub struct ScopedLogger { /* private fields */ }
Implementations§
source§impl ScopedLogger
impl ScopedLogger
pub fn create(logsink: LogSinkProxy) -> Result<Self, ScopedLoggerError>
Trait Implementations§
source§impl Subscriber for ScopedLogger
impl Subscriber for ScopedLogger
source§fn record_follows_from(&self, span: &Id, follows: &Id)
fn record_follows_from(&self, span: &Id, follows: &Id)
§fn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
Invoked when this subscriber becomes a [
Dispatch
]. Read more§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Returns the highest verbosity level that this
Subscriber
will
enable, or None
, if the subscriber does not implement level-based
filtering or chooses not to implement this method. Read more§fn event_enabled(&self, event: &Event<'_>) -> bool
fn event_enabled(&self, event: &Event<'_>) -> bool
Determine if an [
Event
] should be recorded. Read more§fn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
§fn drop_span(&self, _id: Id)
fn drop_span(&self, _id: Id)
👎Deprecated since 0.1.2: use
Subscriber::try_close
insteadThis method is deprecated. Read more
§fn current_span(&self) -> Current
fn current_span(&self) -> Current
Returns a type representing this subscriber’s view of the current span. Read more
Auto Trait Implementations§
impl !Freeze for ScopedLogger
impl !RefUnwindSafe for ScopedLogger
impl Send for ScopedLogger
impl Sync for ScopedLogger
impl Unpin for ScopedLogger
impl !UnwindSafe for ScopedLogger
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
source§impl<T> Encode<Ambiguous1> for T
impl<T> Encode<Ambiguous1> for T
source§impl<T> Encode<Ambiguous2> for T
impl<T> Encode<Ambiguous2> for T
§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>
§impl<T> IntoAny for T
impl<T> IntoAny for T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SubscriberInitExt for Twhere
T: Into<Dispatch>,
impl<T> SubscriberInitExt for Twhere
T: Into<Dispatch>,
source§fn set_default(self) -> DefaultGuard
fn set_default(self) -> DefaultGuard
Sets
self
as the default subscriber in the current scope, returning a
guard that will unset it when dropped. Read moresource§fn try_init(self) -> Result<(), TryInitError>
fn try_init(self) -> Result<(), TryInitError>
Attempts to set
self
as the global default subscriber in the current
scope, returning an error if one is already set. Read moresource§fn init(self)
fn init(self)
Attempts to set
self
as the global default subscriber in the current
scope, panicking if this fails. Read more