log_util_format_msg

Function log_util_format_msg 

#[unsafe(no_mangle)]
pub unsafe extern "C" fn log_util_format_msg( buf: *mut c_char, len: usize, format: *const c_char, ... )
Available on crate feature logging only.
Expand description

Formats a log message.

The default implementation forwards the arguments to vsnprintf.

Our implementation does the same thing but bails out early if the log target isn’t enabled for some extra performance.

§Safety

This function is safe to call IFF:

  • buf contains at least len bytes.
  • format is a valid null-terminated C string.
  • args are valid var args corresponding to format.