Closed Bug 1339176 Opened 8 years ago Closed 8 years ago

Set default rust log level to warn on debug builds

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bholley, Assigned: bholley)

References

Details

We don't really have a great equivalent of NS_WARNING for rust code right now. warn!() is disabled by default, and error!() runs in release builds. We should configure gecko somehow so that --enable-debug builds set the Rust's log level to 'warn'.
It looks like env_logger has support for parsing the log level from a string now: https://docs.rs/env_logger/0.4.0/env_logger/struct.LogBuilder.html#method.parse We could do something like: `` let mut builder = LogBuilder::new(); match env::var("RUST_LOG") { Ok(v) => builder.parse(&v).init(), _ => builder.parse("warn").init(), } ``` We'd have to call that during startup, obviously.
Assignee: nobody → bobbyholley
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.