diff --git a/components/servo/main.rs b/components/servo/main.rs index e78bd2b3170..45a64d74784 100644 --- a/components/servo/main.rs +++ b/components/servo/main.rs @@ -51,11 +51,15 @@ fn load_gl_when_headless() { fn load_gl_when_headless() {} fn main() { - env_logger::init().unwrap(); - // Parse the command line options and store them globally opts::from_cmdline_args(&*args()); + if opts::get().is_running_problem_test && ::std::env::var("RUST_LOG").is_err() { + ::std::env::set_var("RUST_LOG", "compositing::constellation"); + } + + env_logger::init().unwrap(); + setup_logging(); // Possibly interpret the `HOST_FILE` environment variable