From cda463275ed9642e231c92614a986af4a815b351 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 22 Oct 2015 14:34:05 -0700 Subject: [PATCH] Use the log/env_logger crates from crates.io --- Cargo.lock | 11 +++++++++++ Cargo.toml | 2 ++ src/bin/rustfmt.rs | 3 +++ 3 files changed, 16 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index c00a673ebf62..61a586da4f39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,6 +3,8 @@ name = "rustfmt" version = "0.0.1" dependencies = [ "diff 0.1.7 (git+https://github.com/utkarshkukreti/diff.rs.git)", + "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "strings 0.0.1 (git+https://github.com/nrc/strings.rs.git)", @@ -24,6 +26,15 @@ name = "diff" version = "0.1.7" source = "git+https://github.com/utkarshkukreti/diff.rs.git#6edb9454bf4127087aced0fe07ab3ea6894083cb" +[[package]] +name = "env_logger" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.1.4" diff --git a/Cargo.toml b/Cargo.toml index e8b81eb84825..fc8f0aa6026e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,5 +16,7 @@ regex = "0.1.41" term = "0.2.11" strings = { version = "0.0.1", git = "https://github.com/nrc/strings.rs.git" } diff = { git = "https://github.com/utkarshkukreti/diff.rs.git" } +log = "0.3.2" +env_logger = "0.3.1" [dev-dependencies] diff --git a/src/bin/rustfmt.rs b/src/bin/rustfmt.rs index 01c292948dfd..9d8596e5e13b 100644 --- a/src/bin/rustfmt.rs +++ b/src/bin/rustfmt.rs @@ -15,6 +15,7 @@ extern crate log; extern crate rustfmt; extern crate toml; +extern crate env_logger; use rustfmt::{WriteMode, run}; use rustfmt::config::Config; @@ -71,6 +72,8 @@ fn execute() -> i32 { fn main() { use std::io::Write; + let _ = env_logger::init(); + let exit_code = execute(); // Make sure standard output is flushed before we exit std::io::stdout().flush().unwrap();