Function pact_mock_server_ffi::fetch_log_buffer[][src]

#[no_mangle]
pub unsafe extern "C" fn fetch_log_buffer(
    log_id: *const i8
) -> *const i8
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 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.