function logAndHeartBeat(currentTimestamp, processAction, dataArray, index) {
                        /* We need the processing date for logging purposes only */
                        let processingDate = currentTimestamp
                        let dataIndex
                        if (typeof index === 'object') {
                            dataIndex = dataArray.indexOf(index);
                        } else {
                            dataIndex = index
                        }
                        processingDate =
                            processingDate.getUTCFullYear() + '-' +
                            SA.projects.foundations.utilities.miscellaneousFunctions.pad(processingDate.getUTCMonth() + 1, 2) + '-' +
                            SA.projects.foundations.utilities.miscellaneousFunctions.pad(processingDate.getUTCDate(), 2);
        
                        SA.logger.info(MODULE_NAME + processAction + (dataIndex + 1).toFixed(0) + " / " + dataArray.length + " Data from table - " + dbTable + " @ " + processingDate)
                        TS.projects.foundations.functionLibraries.processFunctions.processHeartBeat(processIndex,  processAction + (dataIndex + 1).toFixed(0) + " / " + dataArray.length + " Data from table - " + dbTable + " @ " + processingDate) // tell the world we are alive and doing well                                
                    }
The function logs and sends a heartbeat message during the process of
sorting data.
@param currentTimestamp - The current timestamp is a variable that holds
the current date and time. It is used in this function to log the
processing date and time and to provide a timestamp for the heartbeat
message.