Skip to content

Commit

Permalink
Switch to pretty_env_logger, under --features pretty-env-logger
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Nov 30, 2018
1 parent e70bccf commit aa8eff8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'] }
Expand Down Expand Up @@ -105,3 +106,4 @@ doc = false

[features]
vendored-openssl = ['openssl/vendored']
pretty-env-logger = ['pretty_env_logger']
6 changes: 6 additions & 0 deletions src/bin/cargo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();

Expand Down

0 comments on commit aa8eff8

Please sign in to comment.