pub mod config;
pub mod error;
pub mod exchange;
pub mod github;
pub mod oidc;
pub mod signer;
pub mod trust_policy;

pub fn init_tracing(json: bool) {
    let env_filter = tracing_subscriber::EnvFilter::try_from_default_env()
        .unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info"));

    if json {
        tracing_subscriber::fmt()
            .json()
            .with_env_filter(env_filter)
            .init();
    } else {
        tracing_subscriber::fmt().with_env_filter(env_filter).init();
    }
}
