dracon-sync 0.112.12

Invisible git sync daemon for deterministic AI-assisted development
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Structured logging — human-readable to stderr.

/// Emit a warning-level log line to stderr.
/// Automatically flushes to ensure journald captures each line immediately.
pub(crate) fn warn(msg: &str) {
    eprintln!("⚠️ {msg}");
    use std::io::Write;
    let _ = std::io::stderr().flush();
}

/// Log a warning-level message.
#[macro_export]
macro_rules! log_warn {
    ($($arg:tt)*) => {
        $crate::log::warn(&format!($($arg)*));
    };
}