#[repr(align(64))]pub struct KPrintConfig {
max_log_level: AtomicU8,
log_targets: AtomicU8,
}Expand description
Holds the kernel log configs like max log level and log targets
Fields§
§max_log_level: AtomicU8§log_targets: AtomicU8Implementations§
Source§impl KPrintConfig
impl KPrintConfig
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Constructor; zero-initialize all values.
Important: The zero-initialized values are NOT the correct defaults.
Self::initmust be called first to load the correct defaults.
Sourcepub fn set_max_log_level(&self, log_level: LogLevel)
pub fn set_max_log_level(&self, log_level: LogLevel)
Sets the max log level that will be shown by all kprint macro calls
Sourcepub fn set_log_targets(&self, log_targets: LogTargets)
pub fn set_log_targets(&self, log_targets: LogTargets)
Sets the log level targets to which kprint will dispatch log entries
Sourcepub fn max_log_level(&self) -> LogLevel
pub fn max_log_level(&self) -> LogLevel
Getter for the current max log level
Sourcepub fn log_targets(&self) -> LogTargets
pub fn log_targets(&self) -> LogTargets
Getter for the current log targets