pub fn log_enabled() -> bool {
    static ENABLED: atomic::AtomicIsize = atomic::AtomicIsize::new(0);
    match ENABLED.load(Ordering::SeqCst) {
        1 => return false,
        2 => return true,
        _ => {}
    }

    let val = match env::var_os("RUST_BACKTRACE") {
        Some(x) => if &x == "0" { 1 } else { 2 },
        None => 1,
    };
    ENABLED.store(val, Ordering::SeqCst);
    val == 2
}
// For now logging is turned off by default, and this function checks to see
// whether the magical environment variable is present to see if it's turned on.
For now logging is turned off by default, and this function checks to see
whether the magical environment variable is present to see if it's turned on.
For now logging is turned off by default and this function checks to see whether the magical environment variable is present to see if it ' s turned on .
pub fn log_enabled() -> bool {
    static ENABLED: atomic::AtomicIsize = atomic::AtomicIsize::new(0);
    match ENABLED.load(Ordering::SeqCst) {
        1 => return false,
        2 => return true,
        _ => {}
    }
    let val = match env::var_os("RUST_BACKTRACE") {
        Some(x) => if &x == "0" { 1 } else { 2 },
        None => 1,
    };
    ENABLED.store(val, Ordering::SeqCst);
    val == 2
}
pub fn log_enabled ( ) -> bool { static ENABLED : atomic :: AtomicIsize = atomic :: AtomicIsize :: new ( 0 ) ; match ENABLED . load ( Ordering :: SeqCst ) { 1 => return false , 2 => return true , _ => { } } let val = match env :: var_os ( " " ) { Some ( x ) => if & x == " " { 1 } else { 2 } , None => 1 , } ; ENABLED . store ( val , Ordering :: SeqCst ) ; val == 2 }
For now logging is turned off by default, and this function checks to see
whether the magical environment variable is present to see if it's turned on.
For now logging is turned off by default and this function checks to see whether the magical environment variable is present to see if it ' s turned on .