pub fn debug_add_log_function<T>(function: T) -> DebugLogFunction where
    T: Fn(DebugCategory, DebugLevel, &str, &str, u32, Option<&LoggedObject>, &DebugMessage) + Send + Sync + 'static,