Skip to content

Commit 294c98f

Browse files
authored
Merge pull request #6 from iCog-Labs-Dev/feature/logger
Final build for logger
2 parents 43fc754 + 41a9437 commit 294c98f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

metta-run/release/metta-run

3.35 MB
Binary file not shown.

metta-run/src/tools/logger.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use chrono::Local;
2+
use std::env;
23
use std::fs::OpenOptions;
34
use std::io::Write;
4-
use std::time::{Duration, Instant};
5+
use std::time::Instant;
56

67
pub fn start_timer() -> Instant {
78
Instant::now()
@@ -11,7 +12,8 @@ pub fn stop_timer(start_time: Instant, metta_output: &String) -> Result<(), std:
1112
let now = Local::now();
1213
let formatted_date = now.format("%Y-%m-%d").to_string();
1314

14-
let log_file_name = format!("{}.log", formatted_date);
15+
let metta_bin = format!("{}/metta-bin/", env::var("HOME").unwrap());
16+
let log_file_name = format!("{}{}.log", metta_bin, formatted_date);
1517

1618
let end_time = Instant::now();
1719
let elapsed_time = end_time.duration_since(start_time);

0 commit comments

Comments
 (0)