rusty_logger/
options.rs

1use crate::types::{LogType, TimeUnit};
2
3/// A struct that stores the core data of a logger
4///
5/// You may use the default configuration or make
6/// your own with the `homemade` function depending
7/// on your needs
8pub struct Options {
9    pub name: String,
10    pub time_unit: TimeUnit,
11    pub colors: bool,
12    pub log_level: LogType,
13}
14
15impl Options {
16    pub fn new(s: &str) -> Options {
17        Options {
18            name: s.to_string(),
19            colors: true,
20            time_unit: TimeUnit::Milliseconds,
21            log_level: LogType::Info,
22        }
23    }
24}