Function pact_ffi::log::pactffi_fetch_log_buffer
source · #[no_mangle]
pub unsafe extern "C" fn pactffi_fetch_log_buffer(
log_id: *const c_char
) -> *const c_char
Expand description
Fetch the in-memory logger buffer contents. This will only have any contents if the buffer
sink has been configured to log to. The contents will be allocated on the heap and will need
to be freed with pactffi_string_delete
.
Fetches the logs associated with the provided identifier, or uses the “global” one if the identifier is not specified (i.e. NULL).
Returns a NULL pointer if the buffer can’t be fetched. This can occur is there is not sufficient memory to make a copy of the contents or the buffer contains non-UTF-8 characters.
§Safety
This function will fail if the log_id pointer is invalid or does not point to a NULL terminated string.