Struct DevLogSubscriberBuilder

Source
pub struct DevLogSubscriberBuilder<TimeFormatT> { /* private fields */ }

Implementations§

Source§

impl<TimeFormatT> DevLogSubscriberBuilder<TimeFormatT>

Source

pub fn with_timer<NewTimeFormatT: FormatTime>( self, timer: NewTimeFormatT, ) -> DevLogSubscriberBuilder<NewTimeFormatT>

Uses the given FormatTime implementation for log time formatting.

Source

pub fn without_time(self) -> DevLogSubscriberBuilder<()>

Excludes timestamps from log events.

Source

pub fn with_target(self, display_target: bool) -> Self

Whether to show the target of a log event (where it originated).

Source

pub fn with_level(self, display_level: bool) -> Self

Whether to show the level of a log event (INFO, WARN, ERROR etc.).

Source

pub fn with_thread_ids(self, display_thread_id: bool) -> Self

Whether to show the ID of the current thread in log events.

Source

pub fn with_thread_names(self, display_thread_name: bool) -> Self

Whether to show the name of the current thread in log events.

Source

pub fn with_file(self, display_filename: bool) -> Self

Whether to show the source code file path where a log event was logged.

Source

pub fn with_line_number(self, display_line_number: bool) -> Self

Whether to show the line number in a source code file path where a log event was logged.

Source

pub fn with_source_location(self, display_location: bool) -> Self

Whether to show the source code location (file path + line number) where a log event was logged. Equivalent to calling DevLogSubscriberBuilder::with_file and DevLogSubscriberBuilder::with_line_number with the same value.

Source§

impl<TimeFormatT> DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: FormatTime + Send + Sync + 'static,

Source

pub fn finish(self) -> impl Subscriber

Source

pub fn try_init(self) -> Result<(), Box<dyn Error + Send + Sync + 'static>>

Source

pub fn init(self)

Trait Implementations§

Source§

impl Default for DevLogSubscriberBuilder<DevLogTimeFormat>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<TimeFormatT> Freeze for DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: Freeze,

§

impl<TimeFormatT> RefUnwindSafe for DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: RefUnwindSafe,

§

impl<TimeFormatT> Send for DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: Send,

§

impl<TimeFormatT> Sync for DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: Sync,

§

impl<TimeFormatT> Unpin for DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: Unpin,

§

impl<TimeFormatT> UnwindSafe for DevLogSubscriberBuilder<TimeFormatT>
where TimeFormatT: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more