Skip to main content

Logger

Struct Logger 

Source
struct Logger;
Expand description

log::Log implementation that formats records into CDC_RING.

Trait Implementations§

Source§

impl Log for Logger

Source§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Gate records against the globally configured max level and the crate’s own target namespace.

The log-04 features of esp-hal/esp-rtos route their messages into the same facade — without filtering, the esp-rtos scheduler would flood the 4 KiB ring with task-switch traces on every debug build. Only records originating from this crate’s module tree are accepted; third-party targets can be added here deliberately.

Source§

fn log(&self, record: &Record<'_>)

Format matching records as prefixed lines into the ring.

Source§

fn flush(&self)

No-op — the ring is drained asynchronously by the USB class task.

Auto Trait Implementations§

§

impl Freeze for Logger

§

impl RefUnwindSafe for Logger

§

impl Send for Logger

§

impl Sync for Logger

§

impl Unpin for Logger

§

impl UnsafeUnpin for Logger

§

impl UnwindSafe for Logger

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where 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>

Performs the conversion.