mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Do not log CSS parse errors to stderr by default.
Fix #2083. Change the log level of CSS errors from error to info.
This commit is contained in:
parent
c753f3ee05
commit
aca8e1ea5f
1 changed files with 4 additions and 1 deletions
|
@ -26,10 +26,13 @@ impl<T, I: Iterator<Result<T, SyntaxError>>> Iterator<T> for ErrorLoggerIterator
|
|||
// Using bool is a work-around for https://github.com/mozilla/rust/issues/13322
|
||||
local_data_key!(silence_errors: bool)
|
||||
|
||||
/// Defaults to a no-op.
|
||||
/// Set a `RUST_LOG=style::errors` environment variable
|
||||
/// to log CSS parse errors to stderr.
|
||||
pub fn log_css_error(location: SourceLocation, message: &str) {
|
||||
// TODO eventually this will got into a "web console" or something.
|
||||
if silence_errors.get().is_none() {
|
||||
error!("{:u}:{:u} {:s}", location.line, location.column, message)
|
||||
info!("{:u}:{:u} {:s}", location.line, location.column, message)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue