jupiter_rs/
lib.rs

1use simplelog::{ConfigBuilder, LevelFilter, SimpleLogger};
2
3pub mod builder;
4pub mod commands;
5pub mod config;
6pub mod flag;
7pub mod fmt;
8pub mod infograph;
9pub mod lru;
10pub mod node;
11pub mod ops;
12pub mod ping;
13pub mod platform;
14pub mod repository;
15pub mod request;
16pub mod response;
17pub mod server;
18pub mod signals;
19pub mod watch;
20
21pub fn init_logging() {
22    static DATE_FORMAT: &str = "[%Y-%m-%dT%H:%M:%S%.3f]";
23    if let Err(error) = SimpleLogger::init(
24        LevelFilter::Debug,
25        ConfigBuilder::new()
26            .set_time_format_str(DATE_FORMAT)
27            .set_thread_level(LevelFilter::Trace)
28            .set_target_level(LevelFilter::Error)
29            .set_location_level(LevelFilter::Trace)
30            .build(),
31    ) {
32        panic!("Failed to initialize logging system: {}", error);
33    }
34}