kamu-logging 1.2.2

Small helper crate to configure structured logging for IMMER's services using the tracing ecosystem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! `init()` must error on a second call.

#![cfg(feature = "systemd")]

use kamu_logging::{Error, init};

#[test]
fn second_init_returns_already_initialized() {
    init().expect("first init succeeds");
    let err = init().expect_err("second init must fail");
    assert!(matches!(err, Error::AlreadyInitialized), "expected AlreadyInitialized, got {err:?}",);
}