pub fn with_level(level: log::LevelFilter) {
#[cfg(target_arch = "wasm32")]
wasm::start(level);
#[cfg(not(target_arch = "wasm32"))]
{
// Use ndjson in release mode, pretty logging while debugging.
// here add some cfg! to choose pretty/ndjson
if cfg!(debug_assertions) {
pretty::start(level);
} else {
ndjson::start(level);
}
}
}