blob: d004b348fdf93003847cc830a8f703de73235e1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use chrono::prelude::*;
use std::fs::OpenOptions;
use std::io::Write;
pub fn warn(content: String) {
let mut file = OpenOptions::new()
.write(true)
.append(true)
.create(true)
.open("log.txt")
.unwrap();
let utc: DateTime<Local> = Local::now();
writeln!(file, "[{}] {}", utc, content).unwrap();
}
|
ArKa projects. All rights to me, and your next child right arm.