mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use the correct log crate and setup env_logger in main.
This commit is contained in:
parent
78665336e6
commit
00e8e5f77d
35 changed files with 95 additions and 16 deletions
|
@ -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"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#![feature(core)]
|
||||
#![feature(collections)]
|
||||
#![feature(hash)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(custom_attribute, custom_derive)]
|
||||
#![plugin(string_cache_plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue