aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2014-05-15 19:26:14 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-05-23 09:33:54 +0100
commitaca8e1ea5f3e84d68af337fc536fc49be1e6a93a (patch)
tree0852d079cad914174229f381ea1404d2e84fa6a3
parentc753f3ee05a25b2bb756c3b0c3131eac7ad58f1a (diff)
downloadservo-aca8e1ea5f3e84d68af337fc536fc49be1e6a93a.tar.gz
servo-aca8e1ea5f3e84d68af337fc536fc49be1e6a93a.zip
Do not log CSS parse errors to stderr by default.
Fix #2083. Change the log level of CSS errors from error to info.
-rw-r--r--src/components/style/errors.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/style/errors.rs b/src/components/style/errors.rs
index 38f11904d4b..1abd833fc39 100644
--- a/src/components/style/errors.rs
+++ b/src/components/style/errors.rs
@@ -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)
}
}