formanator 3.1.0

Submit Forma <https://joinforma.com> benefit claims from the command line, with support for AI-powered receipt analysis via OpenAI or GitHub Models
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Process-wide verbose-logging toggle shared by the Forma HTTP client and the
//! LLM client. Both use the same flag because the CLI exposes a single
//! `--verbose` switch per subcommand.

use std::sync::atomic::{AtomicBool, Ordering};

static VERBOSE: AtomicBool = AtomicBool::new(false);

/// Enable or disable verbose request/response logging to stderr.
pub fn set(enabled: bool) {
    VERBOSE.store(enabled, Ordering::Relaxed);
}

/// Whether verbose logging is currently enabled.
pub fn is_enabled() -> bool {
    VERBOSE.load(Ordering::Relaxed)
}