aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorSascha Grunert <mail@saschagrunert.de>2017-02-27 15:20:09 +0100
committerSascha Grunert <mail@saschagrunert.de>2017-02-27 15:20:17 +0100
commit2ffc022d6e30b5b3e79488427c102911dcb32cea (patch)
tree966e58624d256764978d0343a71e1dd18def2896 /src/main.rs
parentCheck for the existence of /run first (diff)
downloadwireguard-rs-2ffc022d6e30b5b3e79488427c102911dcb32cea.tar.xz
wireguard-rs-2ffc022d6e30b5b3e79488427c102911dcb32cea.zip
Improved cli parsing, fixed memory leaks
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 833c821..1dac51d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,7 +17,7 @@ use std::process::exit;
fn main() {
if let Err(error) = run() {
- println!("Main error: {}", error);
+ error!("Error: {}", error);
exit(1);
}
}
@@ -37,6 +37,7 @@ fn run() -> WgResult<()> {
_ => LogLevel::Trace,
};
+ // Init the logging
match mowl::init_with_level(log_level) {
Err(_) => warn!("Log level already set"),
Ok(_) => warn!("Log level set to: {}", log_level),