Fix function name logging for db queries

Is there a reason why 'call_user_func_array' is only interesting in case of LOG_DATABASE rather than in general?