aboutsummaryrefslogtreecommitdiff
path: root/src/helper/init.rs
blob: 2e0537d4b17fbf67d7c242d4fb8526cc0ef96e72 (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);
}
ArKa projects. All rights to me, and your next child right arm.