[−][src]Struct imxrt_uart_log::LoggingConfig
Logging configuration
Allows a user to specify certain configurations of the logging
system. By default, the max log level is the log level set at
compile time. See the compile time filters
section for more information. We also enable logging for all targets.
Set the filters
collection to specify log targets of interest.
If the default configuration is good for you, use Default::default()
.
use imxrt_uart_log::{Filter, LoggingConfig}; const I2C_LOGGING: Filter = ("i2c", None); const SPI_LOGGING: Filter = ("spi", Some(log::LevelFilter::Warn)); const MOTOR_LOGGING: Filter = ("motor", Some(log::LevelFilter::Trace)); let config = LoggingConfig { max_level: log::LevelFilter::Debug, filters: &[ I2C_LOGGING, SPI_LOGGING, MOTOR_LOGGING, ] };
Fields
max_level: LevelFilter
The max log level for all logging
By default, we select the static max level. Users may override this if they'd like to bypass the statically-assigned max level
filters: &'static [Filter]
A list of filtered targets to log.
If set to an empty slice (default), the logger performs no
filtering. Otherwise, we filter the specified targets by
the accompanying log level. See Filter
for
more information.
Trait Implementations
impl Default for LoggingConfig
[src]
fn default() -> LoggingConfig
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,