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)
Firefox Build System
General
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'.
Comment 1•8 years ago
|
||
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 | ||
Updated•8 years ago
|
Assignee: nobody → bobbyholley
Assignee | ||
Comment 2•8 years ago
|
||
Doing this in https://github.com/servo/servo/pull/15557
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•