replace_write_log_message_ex

Function replace_write_log_message_ex 

Source
pub fn replace_write_log_message_ex(f: WriteLogMessageExFuncType) -> Result<()>
Expand description

Replaces the OpenCV writeLogMessageEx function with a user-defined function.

Note: The user-defined function must have the same signature as writeLogMessage.

Note: The user-defined function must accept arguments that can be potentially null.

Note: The user-defined function must be thread-safe, as OpenCV logging may be called from multiple threads.

Note: The user-defined function must not perform any action that can trigger deadlocks or infinite loop. Many OpenCV functions are not re-entrant.

Note: Once replaced, logs will not go through any of the OpenCV logging functions such as writeLogMessage or writeLogMessageEx, until their respective restore methods are called.

Note: To restore, call this function with a nullptr.