pub struct WorkerSubscriber { /* private fields */ }Expand description
A minimal tracing subscriber that logs to the Workers console.
Install once at the start of each request:
ⓘ
tracing::subscriber::set_global_default(WorkerSubscriber::new())
.ok(); // ignore if already setImplementations§
Source§impl WorkerSubscriber
impl WorkerSubscriber
Sourcepub fn with_max_level(self, level: Level) -> Self
pub fn with_max_level(self, level: Level) -> Self
Set the maximum verbosity level that will be logged.
Events above this level are silently discarded. Defaults to DEBUG.
Trait Implementations§
Source§impl Default for WorkerSubscriber
impl Default for WorkerSubscriber
Source§impl Subscriber for WorkerSubscriber
impl Subscriber for WorkerSubscriber
Source§fn new_span(&self, _attrs: &Attributes<'_>) -> Id
fn new_span(&self, _attrs: &Attributes<'_>) -> Id
Source§fn record(&self, _span: &Id, _values: &Record<'_>)
fn record(&self, _span: &Id, _values: &Record<'_>)
Record a set of values on a span. Read more
Source§fn record_follows_from(&self, _span: &Id, _follows: &Id)
fn record_follows_from(&self, _span: &Id, _follows: &Id)
Source§fn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
Source§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Source§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 moreSource§fn event_enabled(&self, event: &Event<'_>) -> bool
fn event_enabled(&self, event: &Event<'_>) -> bool
Source§fn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
Source§fn drop_span(&self, _id: Id)
fn drop_span(&self, _id: Id)
👎Deprecated since 0.1.2:
use Subscriber::try_close instead
This method is deprecated. Read more
Source§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 WorkerSubscriber
impl RefUnwindSafe for WorkerSubscriber
impl Send for WorkerSubscriber
impl Sync for WorkerSubscriber
impl Unpin for WorkerSubscriber
impl UnsafeUnpin for WorkerSubscriber
impl UnwindSafe for WorkerSubscriber
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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