Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/RustyMft.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthew seyer <matthew.seyer@gmail.com>2017-11-07 08:24:28 +0300
committermatthew seyer <matthew.seyer@gmail.com>2017-11-07 08:24:28 +0300
commit347bc3d7b5cfe16e291a1d8f0ee03a7cc1cdd09b (patch)
treee7a782f983ad3afd32e3ea7c550c6f5fa9ac370c
parentd6c5d03a2a306979e805e67c37850990e6cb0fdb (diff)
added logging init
-rw-r--r--Cargo.toml1
-rw-r--r--src/main.rs4
2 files changed, 4 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 28f3600..79452c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,6 +17,7 @@ serde = "0.9"
serde_derive = "0.9"
serde_json = "0.9"
seek_bufread = "~1.2"
+env_logger = "0.3"
[dependencies.jmespath]
version = "^0.1.1"
diff --git a/src/main.rs b/src/main.rs
index 59f1d50..34f46f5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,5 @@
#[macro_use] extern crate log;
+extern crate env_logger;
extern crate rustymft;
extern crate rwinstructs;
extern crate serde_json;
@@ -82,7 +83,7 @@ fn process_file(filename: &str,options: ArgMatches) -> bool {
}
},
Err(error) => {
- warn!("Could not parse file: {} [error: {}]", filename, error);
+ error!("Could not mft_entry: {} [error: {}]", i, error);
continue;
}
};
@@ -96,6 +97,7 @@ fn is_directory(source: &str)->bool{
}
fn main() {
+ env_logger::init().unwrap();
let source_arg = Arg::with_name("source")
.short("s")
.long("source")