summary refs log tree commit diff stats
path: root/src/logging.rs
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-09-04 13:27:17 -0400
committerBen Morrison <ben@gbmor.dev>2019-09-04 13:27:17 -0400
commite2c857a86b36c4b569698dd02323aae324f5409d (patch)
treed46320f942e9a6cbf5ba50e567cbb42f7826918a /src/logging.rs
parent8b3c06f839f14eca6d76da89ffde9fb270fc7b10 (diff)
downloadclinte-e2c857a86b36c4b569698dd02323aae324f5409d.tar.gz
getting user name at single location
Diffstat (limited to 'src/logging.rs')
-rw-r--r--src/logging.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/logging.rs b/src/logging.rs
index 7b8bd2e..c489b63 100644
--- a/src/logging.rs
+++ b/src/logging.rs
@@ -3,16 +3,11 @@ use std::fs::File;
 
 use chrono::offset::Utc;
 use simplelog::*;
-use users;
+
+use crate::user;
 
 lazy_static! {
-    static ref FILE: String = format!(
-        "/tmp/clinte_{}.log",
-        users::get_current_username()
-            .unwrap()
-            .into_string()
-            .unwrap()
-    );
+    static ref FILE: String = format!("/tmp/clinte_{}.log", *user::NAME);
 }
 
 pub fn init() {