zero-trust-rps 0.0.3

Online Multiplayer Rock Paper Scissors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use stderrlog::{LogLevelNum, Timestamp};

pub fn configure_logging(module: &'static str) -> Result<(), log::SetLoggerError> {
    stderrlog::new()
        .module(module)
        .quiet(false)
        .verbosity(if cfg!(debug_assertions) {
            LogLevelNum::Trace
        } else {
            LogLevelNum::Debug
        })
        .timestamp(Timestamp::Second) // TODO: timestamp format without redundant timezone??
        .show_module_names(false)
        .color(stderrlog::ColorChoice::Auto)
        .show_level(true)
        .init()
}