summary refs log tree commit diff stats
path: root/src/logging.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/logging.rs')
-rw-r--r--src/logging.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/logging.rs b/src/logging.rs
index 5d3f378..d748117 100644
--- a/src/logging.rs
+++ b/src/logging.rs
@@ -2,20 +2,12 @@ use std::fs::OpenOptions;
 
 use simplelog::*;
 
-use crate::conf;
 use crate::error;
 use crate::user;
 
 pub fn checked_init() {
     let logfile = format!("/tmp/clinte_{}.log", *user::NAME);
-
-    if let Err(e) = init(&logfile) {
-        log::error!("Couldn't initialize logging. Exiting.");
-        if *conf::DEBUG {
-            log::error!("--> {}", e);
-        }
-        std::process::exit(1);
-    }
+    error::helper(init(&logfile), "Couldn't initialize logging");
 }
 
 fn init(path: &str) -> error::Result<()> {