diff --git a/src/main.rs b/src/main.rs index 28e96ee..a6aa873 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,6 +58,11 @@ fn main() -> Result { .create(true) .open(&log_file_path)?; + const GB: u64 = 1_000_000_000; + if log_file.metadata()?.len() > GB { + log_file.set_len(0)?; + } + let var = args .log_level .as_ref()