Use the correct log crate and setup env_logger in main.

This commit is contained in:
Eduard Burtescu 2015-06-06 23:20:40 +03:00
parent 78665336e6
commit 00e8e5f77d
35 changed files with 95 additions and 16 deletions

View file

@ -28,6 +28,7 @@ git = "https://github.com/servo/string-cache"
git = "https://github.com/servo/string-cache"
[dependencies]
log = "*"
encoding = "0.2"
rustc-serialize = "0.3"
matches = "0.1"

View file

@ -8,7 +8,6 @@
#![feature(core)]
#![feature(collections)]
#![feature(hash)]
#![feature(rustc_private)]
#![feature(custom_attribute, custom_derive)]
#![plugin(string_cache_plugin)]
#![plugin(plugins)]

View file

@ -41,7 +41,7 @@ impl<'a> ParserContext<'a> {
/// Set a `RUST_LOG=style::errors` environment variable
/// to log CSS parse errors to stderr.
pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str) {
if log_enabled!(log::INFO) {
if log_enabled!(log::LogLevel::Info) {
let location = input.source_location(position);
// TODO eventually this will got into a "web console" or something.
info!("{}:{} {}", location.line, location.column, message)