cli: set RUST_BACKTRACE and RUST_LOG if unset

This commit is contained in:
Alex Janka 2024-08-18 12:11:47 +10:00
parent 8faf67e01a
commit 3dc11e7710

View file

@ -122,6 +122,15 @@ impl From<Args> for frontend_common::RunOptions {
}
fn main() -> anyhow::Result<()> {
unsafe {
if std::env::var_os("RUST_BACKTRACE").is_none() {
std::env::set_var("RUST_BACKTRACE", "1");
}
if std::env::var_os("RUST_LOG").is_none() {
std::env::set_var("RUST_LOG", "cli=info,frontend_common=info,gb_emu_lib=info");
}
}
env_logger::init();
let args = Args::parse();