mirror of
https://github.com/rust-lang/cargo
synced 2024-08-28 11:50:23 +00:00
Switch to pretty_env_logger, under --features pretty-env-logger
This commit is contained in:
parent
e70bccff8b
commit
aa8eff88a9
|
@ -25,6 +25,7 @@ crypto-hash = "0.3.1"
|
|||
curl = { version = "0.4.19", features = ['http2'] }
|
||||
curl-sys = "0.4.15"
|
||||
env_logger = "0.6.0"
|
||||
pretty_env_logger = { version = "0.2", optional = true }
|
||||
failure = "0.1.2"
|
||||
filetime = "0.2"
|
||||
flate2 = { version = "1.0.3", features = ['zlib'] }
|
||||
|
@ -105,3 +106,4 @@ doc = false
|
|||
|
||||
[features]
|
||||
vendored-openssl = ['openssl/vendored']
|
||||
pretty-env-logger = ['pretty_env_logger']
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
extern crate cargo;
|
||||
extern crate clap;
|
||||
#[cfg(feature = "pretty-env-logger")]
|
||||
extern crate pretty_env_logger;
|
||||
#[cfg(not(feature = "pretty-env-logger"))]
|
||||
extern crate env_logger;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
|
@ -28,6 +31,9 @@ mod commands;
|
|||
use command_prelude::*;
|
||||
|
||||
fn main() {
|
||||
#[cfg(feature = "pretty-env-logger")]
|
||||
pretty_env_logger::init();
|
||||
#[cfg(not(feature = "pretty-env-logger"))]
|
||||
env_logger::init();
|
||||
cargo::core::maybe_allow_nightly_features();
|
||||
|
||||
|
|
Loading…
Reference in a new issue