Switch from error! and println! to warn!, and set the default log level to warn on debug builds.

This commit is contained in:
Bobby Holley 2017-02-14 16:48:35 -08:00
parent d7d6979144
commit ae87b8a910
6 changed files with 26 additions and 26 deletions

View file

@ -610,15 +610,11 @@ impl ${style_struct.gecko_struct_name} {
% for longhand in stub_longhands:
#[allow(non_snake_case)]
pub fn set_${longhand.ident}(&mut self, _: longhands::${longhand.ident}::computed_value::T) {
if cfg!(debug_assertions) {
println!("stylo: Unimplemented property setter: ${longhand.name}");
}
warn!("stylo: Unimplemented property setter: ${longhand.name}");
}
#[allow(non_snake_case)]
pub fn copy_${longhand.ident}_from(&mut self, _: &Self) {
if cfg!(debug_assertions) {
println!("stylo: Unimplemented property setter: ${longhand.name}");
}
warn!("stylo: Unimplemented property setter: ${longhand.name}");
}
% if longhand.need_clone:
#[allow(non_snake_case)]
@ -2628,7 +2624,7 @@ clip-path
clip_path.mType = StyleShapeSourceType::None;
match v {
ShapeSource::Url(..) => println!("stylo: clip-path: url() not yet implemented"),
ShapeSource::Url(..) => warn!("stylo: clip-path: url() not yet implemented"),
ShapeSource::None => {} // don't change the type
ShapeSource::Box(reference) => {
clip_path.mReferenceBox = reference.into();

View file

@ -119,7 +119,7 @@
% if allow_empty:
try!(dest.write_str("none"));
% else:
error!("Found empty value for property ${name}");
warn!("Found empty value for property ${name}");
% endif
}
for i in iter {
@ -146,7 +146,7 @@
% if allow_empty:
try!(dest.write_str("none"));
% else:
error!("Found empty value for property ${name}");
warn!("Found empty value for property ${name}");
% endif
}
for i in iter {

View file

@ -103,7 +103,7 @@ impl From<nsRestyleHint> for RestyleHint {
// FIXME(bholley): Finish aligning the binary representations here and
// then .expect() the result of the checked version.
if Self::from_bits(raw_bits).is_none() {
error!("stylo: dropping unsupported restyle hint bits");
warn!("stylo: dropping unsupported restyle hint bits");
}
Self::from_bits_truncate(raw_bits)

View file

@ -471,7 +471,7 @@ impl RuleNode {
}
None => {
if indent != 0 {
error!("How has this happened?");
warn!("How has this happened?");
}
let _ = write!(writer, "(root)");
}

View file

@ -101,7 +101,7 @@ impl SpecifiedUrl {
// FIXME(heycam) should ensure we always have a principal, etc.,
// when parsing style attributes and re-parsing due to CSS
// Variables.
println!("stylo: skipping declaration without ParserContextExtraData");
warn!("stylo: skipping declaration without ParserContextExtraData");
return Err(())
},
};