From e2c857a86b36c4b569698dd02323aae324f5409d Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Wed, 4 Sep 2019 13:27:17 -0400 Subject: getting user name at single location --- src/logging.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/logging.rs') 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() { -- cgit 1.4.1-2-gfad0