diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-09-04 13:27:17 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-09-04 13:27:17 -0400 |
commit | e2c857a86b36c4b569698dd02323aae324f5409d (patch) | |
tree | d46320f942e9a6cbf5ba50e567cbb42f7826918a /src/logging.rs | |
parent | 8b3c06f839f14eca6d76da89ffde9fb270fc7b10 (diff) | |
download | clinte-e2c857a86b36c4b569698dd02323aae324f5409d.tar.gz |
getting user name at single location
Diffstat (limited to 'src/logging.rs')
-rw-r--r-- | src/logging.rs | 11 |
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() { |