mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
runtime: allow setting log level in configuration.
This commit is contained in:
parent
cce1481fac
commit
d52723d5bc
@ -68,6 +68,15 @@ fn startup() {
|
||||
}
|
||||
info!("continuing boot");
|
||||
|
||||
match config::read_str("log_level", |r| r?.parse()) {
|
||||
Err(()) => (),
|
||||
Ok(log_level_filter) => {
|
||||
info!("log level set to {} in configuration", log_level_filter);
|
||||
logger_artiq::BufferLogger::with_instance(|logger|
|
||||
logger.set_max_log_level(log_level_filter));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(has_i2c)]
|
||||
board::i2c::init();
|
||||
#[cfg(has_ad9516)]
|
||||
|
Loading…
Reference in New Issue
Block a user