timestamps_format/
timestamps_format.rs

1use simple_logger::SimpleLogger;
2use time::macros::format_description;
3
4fn main() {
5    SimpleLogger::new()
6        .env()
7        .with_timestamp_format(format_description!("[year]-[month]-[day] [hour]:[minute]:[second]"))
8        .init()
9        .unwrap();
10
11    log::warn!("This is an example message with custom timestamp format.");
12}