logging framework
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use docopt::Docopt;
|
||||
use serde::Deserialize;
|
||||
use log::{debug};
|
||||
|
||||
static USAGE: &'static str = "
|
||||
foil
|
||||
@@ -28,10 +29,10 @@ struct Args {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
pretty_env_logger::init();
|
||||
let args: Args = Docopt::new(USAGE)
|
||||
.and_then(|dopt| dopt.deserialize())
|
||||
.unwrap_or_else(|e| e.exit());
|
||||
println!("{:?}", args);
|
||||
debug!("{:?}", args);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user