Skip to content

Commit

Permalink
Avoid including env_logger in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ALCC01 committed Jul 22, 2018
1 parent 334efdb commit 1da4bb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// We don't need debug logs in release builds
#[cfg(debug_assertions)]
extern crate env_logger; // TODO env_logger may not be a good fit
#[macro_use]
extern crate structopt;
Expand Down Expand Up @@ -37,8 +39,8 @@ use cli::args::{match_args, Sigil};
use structopt::StructOpt;

fn main() {
env_logger::init();
tracepoint!();
// We don't need debug logs in release builds
#[cfg(debug_assertions)] env_logger::init();
// Parse CLI arguments
let sigil = Sigil::from_args();
// Match them with a subcommand and run it
Expand Down

0 comments on commit 1da4bb6

Please sign in to comment.