From aca8e1ea5f3e84d68af337fc536fc49be1e6a93a Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 15 May 2014 19:26:14 +0100 Subject: [PATCH] Do not log CSS parse errors to stderr by default. Fix #2083. Change the log level of CSS errors from error to info. --- src/components/style/errors.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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>> Iterator 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) } }