summary refs log tree commit diff stats
path: root/src/ed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ed.rs')
-rw-r--r--src/ed.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ed.rs b/src/ed.rs
index 0e1c4c8..31a27ae 100644
--- a/src/ed.rs
+++ b/src/ed.rs
@@ -4,6 +4,7 @@ use std::process;
 
 use chrono::prelude::*;
 
+use crate::conf;
 use crate::error;
 use crate::user;
 
@@ -13,7 +14,10 @@ fn create_tmp_file<'a>() -> Result<String, &'a str> {
     match fs::write(&file_name, "") {
         Ok(_) => Ok(file_name),
         Err(err) => {
-            log::warn!("{:?}", err);
+            log::warn!("Couldn't create tempfile");
+            if *conf::DEBUG {
+                log::warn!("--> {:?}", err);
+            }
             Err("Unable to create temp file")
         }
     }