fn log(message: &str) {
    METRICS.with(|m| {
        let mut m = m.borrow_mut();
        m.log.push_str(message);
        m.log.push('\n');
        if m.log.len() > 2000 {
            let mut split_index = m.log.len() - 1000;
            while !m.log.is_char_boundary(split_index) {
                split_index += 1;
            }
            m.log = m.log.split_off(split_index);
        }
    });
}
/// Appends a message to the log, ensuring log size stays below 2000 bytes.
Appends a message to the log, ensuring log size stays below 2000 bytes.
Appends a message to the log ensuring log size stays below 2000 bytes .
fn log(message: &str) {
    METRICS.with(|m| {
        let mut m = m.borrow_mut();
        m.log.push_str(message);
        m.log.push('\n');
        if m.log.len() > 2000 {
            let mut split_index = m.log.len() - 1000;
            while !m.log.is_char_boundary(split_index) {
                split_index += 1;
            }
            m.log = m.log.split_off(split_index);
        }
    });
}
fn log ( message : & str ) { METRICS . with ( | m | { let mut m = m . borrow_mut ( ) ; m . log . push_str ( message ) ; m . log . push ( '\n' ) ; if m . log . len ( ) > 2000 { let mut split_index = m . log . len ( ) - 1000 ; while ! m . log . is_char_boundary ( split_index ) { split_index += 1 ; } m . log = m . log . split_off ( split_index ) ; } } ) ; }
Appends a message to the log, ensuring log size stays below 2000 bytes.
Appends a message to the log ensuring log size stays below 2000 bytes .
message
&str
message
&str