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

@ -23,6 +23,7 @@ git = "https://github.com/servo/rust-geom"
git = "https://github.com/servo/rust-png"
[dependencies]
log = "*"
url = "0.2.35"
time = "0.1.17"
openssl="0.6.1"

View file

@ -193,7 +193,7 @@ reason: \"certificate verify failed\" }]))";
if !req.headers().has::<AcceptEncoding>() {
req.headers_mut().set_raw("Accept-Encoding".to_owned(), vec![b"gzip, deflate".to_vec()]);
}
if log_enabled!(log::INFO) {
if log_enabled!(log::LogLevel::Info) {
info!("{}", load_data.method);
for header in req.headers().iter() {
info!(" - {}", header);
@ -257,7 +257,7 @@ reason: \"certificate verify failed\" }]))";
// Dump headers, but only do the iteration if info!() is enabled.
info!("got HTTP response {}, headers:", response.status);
if log_enabled!(log::INFO) {
if log_enabled!(log::LogLevel::Info) {
for header in response.headers.iter() {
info!(" - {}", header);
}

View file

@ -8,7 +8,6 @@
#![feature(core)]
#![feature(path_ext)]
#![feature(plugin)]
#![feature(rustc_private)]
#![feature(std_misc)]
#![plugin(regex_macros)]