#[unsafe(no_mangle)]pub unsafe extern "C" fn dora_log(
context: *mut c_void,
level_ptr: *const u8,
level_len: usize,
msg_ptr: *const u8,
msg_len: usize,
) -> c_intExpand description
Sends a structured log message from a C node.
The level_ptr/level_len fields must point to a UTF-8 string containing
one of: “error”, “warn”, “info”, “debug”, “trace”.
The msg_ptr/msg_len fields must point to a UTF-8 string with the log
message.
Returns 0 on success, -1 on error.
§Safety
- The
contextargument must be a valid dora context frominit_dora_context_from_env. - The pointer/length pairs must describe valid UTF-8 byte slices.