Skip to main content

libsession_set_log_fn

Function libsession_set_log_fn 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn libsession_set_log_fn( ctx: *mut LibsessionContext, callback: LibsessionLogFn, ) -> LibsessionStatus
Expand description

Sets the context’s logging callback, or disables callbacks with None.

§Safety

Non-null ctx must be a live context on the thread that created it. The callback must remain callable until replaced or the context is freed. It must not unwind, access the context reentrantly, or retain the message pointer, which is valid only for the duration of the callback.